diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
index 4c7efe1d75452..63a2bd72af84b 100644
--- a/.config/dotnet-tools.json
+++ b/.config/dotnet-tools.json
@@ -15,7 +15,7 @@
]
},
"microsoft.dotnet.xharness.cli": {
- "version": "1.0.0-prerelease.20559.2",
+ "version": "1.0.0-prerelease.20575.2",
"commands": [
"xharness"
]
diff --git a/Directory.Build.props b/Directory.Build.props
index 799d054f3b1af..91557e1435793 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -57,7 +57,7 @@
$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmAppBuilder', 'Debug', '$(NetCoreAppCurrent)', 'publish'))
$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmBuildTasks', 'Debug', '$(NetCoreAppCurrent)', 'publish'))
$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoAOTCompiler', 'Debug', '$(NetCoreAppCurrent)'))
-
+
$([MSBuild]::NormalizePath('$(AppleAppBuilderDir)', 'AppleAppBuilder.dll'))
$([MSBuild]::NormalizePath('$(AndroidAppBuilderDir)', 'AndroidAppBuilder.dll'))
$([MSBuild]::NormalizePath('$(WasmAppBuilderDir)', 'WasmAppBuilder.dll'))
@@ -105,8 +105,6 @@
-
- true
false
diff --git a/docs/coding-guidelines/api-guidelines/nullability.md b/docs/coding-guidelines/api-guidelines/nullability.md
index 9cb1b96525c2f..807a0c3f91f68 100644
--- a/docs/coding-guidelines/api-guidelines/nullability.md
+++ b/docs/coding-guidelines/api-guidelines/nullability.md
@@ -1,20 +1,20 @@
# Nullability annotations
-C# 8 provides an opt-in feature that allows for the compiler to track reference type nullability in order to catch potential null dereferences. We are adopting that feature across .NET's libraries, working up from the bottom of the stack. We're doing this for three primary reasons, in order of importance:
+As of C# 8 and improved in C# 9, the C# language provides an opt-in feature that allows the compiler to track reference type nullability in order to catch potential null dereferences. We have adopted that feature set across .NET's libraries, working up from the bottom of the stack. We've done this (and continue to do so for all new library development) for three primary reasons, in order of importance:
-- **To annotate the .NET surface area with appropriate nullability annotations.** While this could be done solely in the reference assemblies, we're doing it first in the implementation to help validate the selected annotations.
-- **To help validate the nullability feature itself.** With millions of lines of C# code, we have a very large and robust codebase with which to try out the feature and find areas in which it shines and areas in which we can improve it. The work to annotate System.Private.CoreLib in .NET Core 3.0 helped to improve the feature as shipped in C# 8, and annotating the rest of the libraries will continue to be helpful in this regard.
-- **To find null-related bugs in .NET Runtime itself.** We expect to find relatively few meaningful bugs, due to how relatively well-tested the codebases are and how long they've been around.
+- **To annotate the .NET surface area with appropriate nullability annotations.** While this could be done solely in the reference assemblies, we do it in the implementation to help validate the selected annotations.
+- **To help validate the nullability feature itself.** With millions of lines of C# code, we have a very large and robust codebase with which to try out features and find areas in which it shines and areas in which we can improve it. The work to annotate System.Private.CoreLib in .NET Core 3.0 helped to improve the feature as shipped in C# 8, and the rest of the core libraries being annotated in .NET 5 helped to further flesh out the design for C# 9.
+- **To find null-related bugs in .NET Runtime itself.** We have found few meaningful bugs, due to how relatively well-tested the codebases are and how long they've been around. However, for new code, the annotations do help to highlight places where null values may be erroneously dereferenced, helping to avoid NullReferenceExceptions in places testing may not yet be adequate.
## Breaking Change Guidance
-We are striving to get annotations correct the "first time" and are doing due-diligence in an attempt to do so. However, we acknowledge that we are likely to need to augment and change some annotations in the future:
+We strive to get annotations correct the "first time" and do due-diligence in an attempt to do so. However, we acknowledge that we are likely to need to augment and change some annotations in the future:
- **Mistakes.** Given the sheer number of APIs being reviewed and annotated, we are likely to make some errors, and we'd like to be able to fix them so that long-term customers get the greatest benefit.
-- **Breadth.** Annotation takes time, so annotations will roll out over time rather than being released all at once.
+- **Breadth.** Annotation takes time, so annotations have rolled out and will continue to roll out over time rather than all at once for the whole stack.
- **Feedback.** We may need to revisit some "gray area" decisions as to whether a parameter or return type should be nullable or non-nullable (more details later).
-Any such additions or changes to annotations can impact the warnings consuming code receives if that code has opted in to nullability analysis and warnings. Even so, for at least the foreseeable future we may still do so. We will be very thoughtful about when and how we do.
+Any such additions or changes to annotations can impact the warnings consuming code receives if that code has opted-in to nullability analysis and warnings. Even so, for at least the foreseeable future we may still do so, and we will be very thoughtful about when and how we do.
## Annotation Guidance
@@ -23,7 +23,7 @@ Nullability annotations are considered to represent intent: they represent the n
- **DO** annotate all new APIs with the desired contract.
- **CONSIDER** changing that contract if overwhelming use suggests a different de facto contract. This is particularly relevant to virtual/abstract/interface methods defined in a library where all implementations may not be under your control, and derived implementations may not have adhered to the original intent.
- **DO** respect documented behaviors. Nullability annotations are about codifying a contract, and documentation is a description of that contract. If, for example, a base abstract or virtual method says that it may throw an exception if `null` is passed in, that dictates that the argument should be non-nullable.
-- **DO** continue to validate all arguments as you would have prior to nullability warnings. In particular, if you would have checked an argument for `null` and thrown an `ArgumentNullException` if it was `null`, continue to do so, even if the parameter is defined as non-nullable. Many consumers will not have nullability checked enabled, either because they're using a language other than C#, they're using an older version of C#, they simply haven't opted-in to nullability analysis, or the compiler isn't able to detect the misuse.
+- **DO** continue to validate all arguments as you would have prior to nullability warnings. In particular, if you would have checked an argument for `null` and thrown an `ArgumentNullException` if it was `null`, continue to do so, even if the parameter is defined as non-nullable. Many consumers will not have nullability checked enabled, either because they're using a language other than C#, they're using an older version of C#, they simply haven't opted-in to nullability analysis, they've explicitly suppressed warnings, or the compiler isn't able to detect the misuse.
- **DO NOT** remove existing argument validation when annotating existing public/protected APIs. If through the course of annotating it becomes clear that internal/private surface area is unnecessarily checking for nulls when nulls aren't possible (i.e. you found dead code), such use can be removed or replaced by asserts.
- **AVOID** making any changes while annotating that substantively impact the generated IL for an implementation (e.g. `some.Method()` to `some?.Method()`). Any such changes should be thoroughly analyzed and reviewed as a bug fix. In some cases, such changes may be warranted, but they're a red flag that should be scrutinized heavily.
diff --git a/docs/design/coreclr/jit/lsra-detail.md b/docs/design/coreclr/jit/lsra-detail.md
index a637b8ac6982c..47292dadcfdbc 100644
--- a/docs/design/coreclr/jit/lsra-detail.md
+++ b/docs/design/coreclr/jit/lsra-detail.md
@@ -387,7 +387,7 @@ well as supporting components) in more depth.
- `LinearScan::identifyCandidates`
- This mostly duplicates what is done in
- `Compiler::lvaMarkLocalVars(). There are differences in what
+ `Compiler::lvaMarkLocalVars()`. There are differences in what
constitutes a register candidate vs. what is tracked, but we
should probably handle them in `Compiler::lvaMarkLocalVars()`
when it is called after `Lowering`.
@@ -445,7 +445,7 @@ node, which builds `RefPositions` according to the liveness model described abov
- First, we create `RefPosition`s to define any internal registers that are required.
As we create new `Interval`s for these, we add the definition `RefPosition` to an array,
- `InternalDefs`. This allows us to create the corresponding uses of these internal
+ `internalDefs`. This allows us to create the corresponding uses of these internal
registers later.
- Then we create `RefPosition`s for each use in the instruction.
@@ -474,7 +474,7 @@ node, which builds `RefPositions` according to the liveness model described abov
we need to ensure that the other source isn't given the same register as the
target. For this, we annotate the use `RefPosition` with `delayRegFree`.
-- Next we create the uses of the internal registers, using the `InternalDefs` array.
+- Next we create the uses of the internal registers, using the `internalDefs` array.
This is cleared before the next instruction is handled.
- Next, any registers in the kill set for the instruction are killed. This is performed
@@ -652,7 +652,7 @@ LinearScanAllocation(List refPositions)
- When `COMPlus_EnableEHWriteThru == 0`, any variable that's
live in to an exception region is always referenced on the stack.
- - See [Enable EHWriteThru by default](#enable-EHWriteThru-by-default).
+ - See [Enable EHWriteThru by default](#enable-ehwritethru-by-default).
- Code generation (genGenerateCode)
diff --git a/docs/workflow/requirements/linux-requirements.md b/docs/workflow/requirements/linux-requirements.md
index 7563fdf7d7c01..cc83281360681 100644
--- a/docs/workflow/requirements/linux-requirements.md
+++ b/docs/workflow/requirements/linux-requirements.md
@@ -50,7 +50,7 @@ Install the following packages for the toolchain:
- libkrb5-dev
- libnuma-dev (optional, enables numa support)
- zlib1g-dev
-- ninja (optional, enables building native code with ninja instead of make)
+- ninja-build (optional, enables building native code with ninja instead of make)
The following dependencies are needed if Mono Runtime is enabled (default behavior):
@@ -62,7 +62,7 @@ The following dependencies are needed if Mono Runtime is enabled (default behavi
sudo apt-get install -y cmake llvm-9 clang-9 autoconf automake \
libtool build-essential python curl git lldb-6.0 liblldb-6.0-dev \
libunwind8 libunwind8-dev gettext libicu-dev liblttng-ust-dev \
-libssl-dev libnuma-dev libkrb5-dev zlib1g-dev ninja
+libssl-dev libnuma-dev libkrb5-dev zlib1g-dev ninja-build
```
You now have all the required components.
diff --git a/docs/workflow/testing/mono/testing.md b/docs/workflow/testing/mono/testing.md
index 1bffa1de3389b..be444b2561771 100644
--- a/docs/workflow/testing/mono/testing.md
+++ b/docs/workflow/testing/mono/testing.md
@@ -1,54 +1,108 @@
-# Running Tests using Mono Runtime
+# Running test suites using Mono
-## Running Runtime Tests
-We currently only support running tests against coreclr. There are additional mono runtime tests in mono/mono, but they
-have not been moved over yet. Simply run the following command:
+Before running tests, [build Mono](../../building/mono/README.md) using the desired configuration.
+## Runtime Tests
+### Desktop Mono:
+
+To build the runtime tests for Mono JIT or interpreter, execute the following command from `$(REPO_ROOT)/src/tests`
+```
+./build.sh excludemonofailures
+```
+
+Run individual test:
+```
+cd ../mono/netcore
+make run-tests-coreclr CoreClrTest="bash ../../artifacts/tests/coreclr/OSX.x64.Release/JIT/opt/InstructionCombining/DivToMul/DivToMul.sh"
+```
+
+Run all tests:
+```
+cd ../mono/netcore
+make run-tests-coreclr-all
+```
+
+### WebAssembly:
+Build the runtime tests for WebAssembly
+```
+$(REPO_ROOT)/src/tests/build.sh -skipstressdependencies -excludemonofailures os Browser wasm
+```
+
+The last few lines of the build log should contain something like this:
```
-dotnet build /t:RunCoreClrTests $(REPO_ROOT)/src/mono/mono.proj
+--------------------------------------------------
+ Example run.sh command
+
+ src/tests/run.sh --coreOverlayDir=artifacts/tests/coreclr/Browser.wasm.Release/Tests/Core_Root --testNativeBinDir=/artifacts/obj/coreclr/Browser.wasm.Release/tests --testRootDir=/artifacts/tests/coreclr/Browser.wasm.Release --copyNativeTestBin Release
+--------------------------------------------------
```
-If you want to run individual tests, execute this command:
+To run all tests, execute that command, adding `wasm` to the end.
+### Android:
+Build the runtime tests for Android x64
+```
+$(REPO_ROOT)/src/tests/build.sh -skipstressdependencies -excludemonofailures os Android x64
```
-dotnet build /t:RunCoreClrTest /p:CoreClrTest="" $(REPO_ROOT)/src/mono/mono.proj
+
+The last few lines of the build log should contain something like this:
```
+--------------------------------------------------
+ Example run.sh command
-## Running Library Tests
-Running library tests against Mono is straightforward regardless of configuration. Simply run the following commands:
+ src/tests/run.sh --coreOverlayDir=artifacts/tests/coreclr/Android.x64.Release/Tests/Core_Root --testNativeBinDir=/artifacts/obj/coreclr/Android.x64.Release/tests --testRootDir=/artifacts/tests/coreclr/Android.x64.Release --copyNativeTestBin Release
+--------------------------------------------------
+```
+To run all tests, execute that command, adding `Android` at the end.
-1. Build and set the RuntimeFlavor
+### Additional Documents
+For more details about internals of the runtime tests, please refer to the [CoreCLR testing documents](../coreclr)
-```bash
-./build.sh /p:RuntimeFlavor=mono
+## Libraries tests
+### Desktop Mono
+Build and run library tests against Mono JIT or interpreter
+```
+$(REPO_ROOT)/dotnet.sh build /t:Test /p:RuntimeFlavor=mono /p:Configuration= $(REPO_ROOT)/src/libraries//tests
```
-or on Windows
-```bat
-build.cmd /p:RuntimeFlavor=mono
+Alternatively, you could execute the following command from `$(REPO_ROOT)/src/mono/netcore`
```
+make run-tests-corefx-
+```
+For example, the following command is for running System.Runtime tests:
+```
+make run-tests-corefx-System.Runtime
+```
+### Mobile targets and WebAssembly
+Build and run library tests against Webassembly, Android or iOS. See instructions located in [Library testing document folder](../libraries/)
-2. cd into the test library of your choice (`cd src/libraries//tests`)
+# Running the Mono samples
+There are a few convenient samples located in `$(REPO_ROOT)/src/mono/netcore/sample`, which could help you test your program easily with different flavors of Mono or do a sanity check on the build. The samples are set up to work with a specific configuration; please refer to the relevant Makefile for specifics. If you would like to work with a different configuration, you can edit the Makefile.
-3. Run the tests
+## Desktop Mono
+To run the desktop Mono sample, cd to `HelloWorld` and execute:
```
-dotnet build /t:Test /p:RuntimeFlavor=mono
+make run
```
+Note that the default configuration of this sample is LLVM JIT.
-# Patching Local dotnet (.dotnet-mono)
-Another way to test mono out is by 'patching' a local dotnet with our runtime bits. This is a good way to write simple
-test programs and get a glimpse of how mono will work with the dotnet tooling.
+## WebAssembly
+To run the WebAssembly sample, cd to `wasm`. There are two sub-folders `browser` and `console`. One is set up to run the progam in browser, the other is set up to run the program in console. Enter the desirable sub-folder and execute
+
+```
+make build && make run
+```
-To generate a local .dotnet-mono, execute this command:
+## Android
+To run the Android sample, cd to `Android` and execute
```
-dotnet build /t:PatchLocalMonoDotnet $(REPO_ROOT)/src/mono/mono.proj
+make run
```
-You can then, for example, run our HelloWorld sample via:
+## iOS
+To run the iOS sample, cd to `iOS` and execute
```
-dotnet build -c Release $(REPO_ROOT)/src/mono/netcore/sample/HelloWorld
-MONO_ENV_OPTIONS="" COMPlus_DebugWriteToStdErr=1 \
-$(REPO_ROOT)/.dotnet-mono/dotnet $(REPO_ROOT)/src/mono/netcore/sample/HelloWorld/bin/HelloWorld.dll
+make run
```
diff --git a/eng/Configurations.props b/eng/Configurations.props
index d26beec0e3e68..09814ae0c05e3 100644
--- a/eng/Configurations.props
+++ b/eng/Configurations.props
@@ -4,6 +4,11 @@
steps and in the repository.
-->
+
+
+ true
+
+
$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'libraries'))
$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'coreclr'))
@@ -49,9 +54,6 @@
- $([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)
- win-$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLowerInvariant)
-
OSX
FreeBSD
NetBSD
@@ -68,6 +70,109 @@
true
+
+ <_runtimeOS>$(RuntimeOS)
+
+ <_parseDistroRid>$(__DistroRid)
+ <_parseDistroRid Condition="'$(_parseDistroRid)' == '' and '$(MSBuildRuntimeType)' == 'core'">$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)
+ <_parseDistroRid Condition="'$(_parseDistroRid)' == '' and '$(MSBuildRuntimeType)' != 'core'">win-$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLowerInvariant)
+ <_distroRidIndex>$(_parseDistroRid.LastIndexOfAny("-"))
+
+ <_runtimeOS Condition="'$(_runtimeOS)' == ''">$(_parseDistroRid.SubString(0, $(_distroRidIndex)))
+
+
+ <_runtimeOS Condition="'$(TargetsMobile)' == 'true'">$(TargetOS.ToLowerInvariant())
+
+ <_runtimeOSVersionIndex>$(_runtimeOS.IndexOfAny(".-0123456789"))
+ <_runtimeOSFamily Condition="'$(_runtimeOSVersionIndex)' != '-1'">$(_runtimeOS.SubString(0, $(_runtimeOSVersionIndex)))
+
+ <_buildingInOSX>$([MSBuild]::IsOSPlatform('OSX'))
+ <_portableOS>linux
+ <_portableOS Condition="'$(_runtimeOS)' == 'linux-musl'">linux-musl
+ <_portableOS Condition="$(_buildingInOSX)">osx
+ <_portableOS Condition="'$(_runtimeOSFamily)' == 'win' or '$(TargetOS)' == 'windows'">win
+ <_portableOS Condition="'$(_runtimeOSFamily)' == 'FreeBSD'">freebsd
+ <_portableOS Condition="'$(_runtimeOSFamily)' == 'illumos'">illumos
+ <_portableOS Condition="'$(_runtimeOSFamily)' == 'Solaris'">solaris
+ <_portableOS Condition="'$(_runtimeOS)' == 'Browser'">browser
+ <_portableOS Condition="'$(_runtimeOS)' == 'ios'">ios
+ <_portableOS Condition="'$(_runtimeOS)' == 'tvos'">tvos
+ <_portableOS Condition="'$(_runtimeOS)' == 'android'">android
+
+ <_runtimeOS Condition="$(_runtimeOS.StartsWith('tizen'))">linux
+ <_runtimeOS Condition="'$(PortableBuild)' == 'true'">$(_portableOS)
+
+
+ <_portableOS Condition="'$(TargetOS)' == 'Unix' and '$(_runtimeOSFamily)' != 'osx' and '$(_runtimeOSFamily)' != 'FreeBSD' and '$(_runtimeOS)' != 'linux-musl' and '$(_runtimeOSFamily)' != 'illumos' and '$(_runtimeOSFamily)' != 'Solaris'">linux
+
+
+
+ <_hostArch>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant)
+ arm
+ arm64
+ wasm
+ x64
+ x64
+
+
+
+ <_toolRuntimeRID Condition="'$(BuildingInsideVisualStudio)' == 'true'">$(_runtimeOS)-x64
+ <_toolRuntimeRID Condition="'$(_toolRuntimeRID)' == ''">$(_runtimeOS)-$(_hostArch)
+
+ <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'linux-musl' and $(TargetArchitecture.StartsWith('arm')) and !$(_hostArch.StartsWith('arm'))">linux-x64
+
+
+ <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'browser' and '$(TargetOS)' == 'windows'">win-x64
+ <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'browser' and '$(TargetOS)' != 'windows' and $(_buildingInOSX)">osx-x64
+ <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'browser' and '$(TargetOS)' != 'windows' and !$(_buildingInOSX)">linux-x64
+
+
+ <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'android' and '$(TargetOS)' == 'windows'">win-x64
+ <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'android' and '$(TargetOS)' != 'windows' and $(_buildingInOSX)">osx-x64
+ <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'android' and '$(TargetOS)' != 'windows' and !$(_buildingInOSX)">linux-x64
+
+
+ <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'ios' or '$(_runtimeOS)' == 'tvos'">osx-x64
+ $(_toolRuntimeRID)
+
+ <_packageRID Condition="'$(PortableBuild)' == 'true'">$(_portableOS)-$(TargetArchitecture)
+ $(_packageRID)
+ $(_runtimeOS)-$(TargetArchitecture)
+
+ <_outputRID Condition="'$(TargetOS)' == 'windows'">win-$(TargetArchitecture)
+ <_outputRID Condition="'$(TargetOS)' == 'OSX'">osx-$(TargetArchitecture)
+ <_outputRID Condition="'$(TargetOS)' == 'Linux'">linux-$(TargetArchitecture)
+ <_outputRID Condition="'$(TargetOS)' == 'FreeBSD'">freebsd-$(TargetArchitecture)
+ <_outputRID Condition="'$(TargetOS)' == 'NetBSD'">netbsd-$(TargetArchitecture)
+ <_outputRID Condition="'$(TargetOS)' == 'illumos'">illumos-$(TargetArchitecture)
+ <_outputRID Condition="'$(TargetOS)' == 'Solaris'">solaris-$(TargetArchitecture)
+ <_outputRID Condition="'$(TargetOS)' == 'iOS'">ios-$(TargetArchitecture)
+ <_outputRID Condition="'$(TargetOS)' == 'tvOS'">tvos-$(TargetArchitecture)
+ <_outputRID Condition="'$(TargetOS)' == 'Android'">android-$(TargetArchitecture)
+ <_outputRID Condition="'$(TargetOS)' == 'Browser'">browser-$(TargetArchitecture)
+
+ $(PackageRID)
+ $(_outputRID)
+
+
+
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+
+
true
@@ -76,4 +181,6 @@
false
+
+
diff --git a/eng/Signing.props b/eng/Signing.props
index 3d5e996083438..2d29ea85ea41d 100644
--- a/eng/Signing.props
+++ b/eng/Signing.props
@@ -44,6 +44,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 9d3af614d4e46..3a283bbc440c7 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -4,75 +4,75 @@
https://github.com/dotnet/standard
cfe95a23647c7de1fe1a349343115bd7720d6949
-
+
https://github.com/dotnet/icu
- a39deb47c8f20ed5adb57cddbc83ac587413c4e4
+ f9c78959ceca029309ae76932fb441cacb9650d1
-
+
https://github.com/dotnet/arcade
- 3fea3a1b584e3ddd9145d80a0cfb51e3e658c464
+ 35bddd4fbfab8da3518fb920250d7c9e0c3138ff
-
+
https://github.com/dotnet/arcade
- 3fea3a1b584e3ddd9145d80a0cfb51e3e658c464
+ 35bddd4fbfab8da3518fb920250d7c9e0c3138ff
-
+
https://github.com/dotnet/arcade
- 3fea3a1b584e3ddd9145d80a0cfb51e3e658c464
+ 35bddd4fbfab8da3518fb920250d7c9e0c3138ff
-
+
https://github.com/dotnet/arcade
- 3fea3a1b584e3ddd9145d80a0cfb51e3e658c464
+ 35bddd4fbfab8da3518fb920250d7c9e0c3138ff
-
+
https://github.com/dotnet/arcade
- 3fea3a1b584e3ddd9145d80a0cfb51e3e658c464
+ 35bddd4fbfab8da3518fb920250d7c9e0c3138ff
-
+
https://github.com/dotnet/arcade
- 3fea3a1b584e3ddd9145d80a0cfb51e3e658c464
+ 35bddd4fbfab8da3518fb920250d7c9e0c3138ff
-
+
https://github.com/dotnet/arcade
- 3fea3a1b584e3ddd9145d80a0cfb51e3e658c464
+ 35bddd4fbfab8da3518fb920250d7c9e0c3138ff
-
+
https://github.com/dotnet/arcade
- 94dab3b0a2c74c53d7552c6985eafea4629d0eb9
+ 35bddd4fbfab8da3518fb920250d7c9e0c3138ff
-
+
https://github.com/dotnet/arcade
- 3fea3a1b584e3ddd9145d80a0cfb51e3e658c464
+ 35bddd4fbfab8da3518fb920250d7c9e0c3138ff
-
+
https://github.com/dotnet/arcade
- 3fea3a1b584e3ddd9145d80a0cfb51e3e658c464
+ 35bddd4fbfab8da3518fb920250d7c9e0c3138ff
-
+
https://github.com/dotnet/arcade
- 3fea3a1b584e3ddd9145d80a0cfb51e3e658c464
+ 35bddd4fbfab8da3518fb920250d7c9e0c3138ff
-
+
https://github.com/dotnet/arcade
- 3fea3a1b584e3ddd9145d80a0cfb51e3e658c464
+ 35bddd4fbfab8da3518fb920250d7c9e0c3138ff
-
+
https://github.com/dotnet/arcade
- 3fea3a1b584e3ddd9145d80a0cfb51e3e658c464
+ 35bddd4fbfab8da3518fb920250d7c9e0c3138ff
-
+
https://github.com/dotnet/arcade
- 3fea3a1b584e3ddd9145d80a0cfb51e3e658c464
+ 35bddd4fbfab8da3518fb920250d7c9e0c3138ff
-
+
https://github.com/dotnet/arcade
- 3fea3a1b584e3ddd9145d80a0cfb51e3e658c464
+ 35bddd4fbfab8da3518fb920250d7c9e0c3138ff
-
+
https://github.com/dotnet/arcade
- 3fea3a1b584e3ddd9145d80a0cfb51e3e658c464
+ 35bddd4fbfab8da3518fb920250d7c9e0c3138ff
https://dev.azure.com/dnceng/internal/_git/dotnet-optimization
@@ -98,73 +98,73 @@
https://github.com/microsoft/vstest
b195e2589980861425b331e73a859252c3f2b71a
-
+
https://github.com/dotnet/runtime-assets
- edc9df4021be1dff54b8d8be88b4bee7626cb6a5
+ 8c81a93d8914cc77a9858152c44e395b81083de5
-
+
https://github.com/dotnet/runtime-assets
- edc9df4021be1dff54b8d8be88b4bee7626cb6a5
+ 8c81a93d8914cc77a9858152c44e395b81083de5
-
+
https://github.com/dotnet/runtime-assets
- edc9df4021be1dff54b8d8be88b4bee7626cb6a5
+ 8c81a93d8914cc77a9858152c44e395b81083de5
-
+
https://github.com/dotnet/runtime-assets
- edc9df4021be1dff54b8d8be88b4bee7626cb6a5
+ 8c81a93d8914cc77a9858152c44e395b81083de5
-
+
https://github.com/dotnet/runtime-assets
- edc9df4021be1dff54b8d8be88b4bee7626cb6a5
+ 8c81a93d8914cc77a9858152c44e395b81083de5
-
+
https://github.com/dotnet/runtime-assets
- edc9df4021be1dff54b8d8be88b4bee7626cb6a5
+ 8c81a93d8914cc77a9858152c44e395b81083de5
-
+
https://github.com/dotnet/runtime-assets
- edc9df4021be1dff54b8d8be88b4bee7626cb6a5
+ 8c81a93d8914cc77a9858152c44e395b81083de5
-
+
https://github.com/dotnet/runtime-assets
- edc9df4021be1dff54b8d8be88b4bee7626cb6a5
+ 8c81a93d8914cc77a9858152c44e395b81083de5
-
+
https://github.com/dotnet/runtime-assets
- edc9df4021be1dff54b8d8be88b4bee7626cb6a5
+ 8c81a93d8914cc77a9858152c44e395b81083de5
-
+
https://github.com/dotnet/llvm-project
- d6c16bf3ec8315049ad0412a7d41e8858b5d0d13
+ 395ff4866ce6b470b4d96ee599ebf6dc57fb7dd6
-
+
https://github.com/dotnet/llvm-project
- d6c16bf3ec8315049ad0412a7d41e8858b5d0d13
+ 395ff4866ce6b470b4d96ee599ebf6dc57fb7dd6
-
+
https://github.com/dotnet/llvm-project
- d6c16bf3ec8315049ad0412a7d41e8858b5d0d13
+ 395ff4866ce6b470b4d96ee599ebf6dc57fb7dd6
-
+
https://github.com/dotnet/llvm-project
- d6c16bf3ec8315049ad0412a7d41e8858b5d0d13
+ 395ff4866ce6b470b4d96ee599ebf6dc57fb7dd6
-
+
https://github.com/dotnet/llvm-project
- d6c16bf3ec8315049ad0412a7d41e8858b5d0d13
+ 395ff4866ce6b470b4d96ee599ebf6dc57fb7dd6
-
+
https://github.com/dotnet/llvm-project
- d6c16bf3ec8315049ad0412a7d41e8858b5d0d13
+ 395ff4866ce6b470b4d96ee599ebf6dc57fb7dd6
-
+
https://github.com/dotnet/llvm-project
- d6c16bf3ec8315049ad0412a7d41e8858b5d0d13
+ 395ff4866ce6b470b4d96ee599ebf6dc57fb7dd6
-
+
https://github.com/dotnet/llvm-project
- d6c16bf3ec8315049ad0412a7d41e8858b5d0d13
+ 395ff4866ce6b470b4d96ee599ebf6dc57fb7dd6
https://github.com/dotnet/runtime
@@ -198,13 +198,13 @@
https://github.com/mono/linker
8ee2557ccbaf9e4cf243f15b8cb95da4eddb18aa
-
+
https://github.com/dotnet/xharness
- ab2eee629494e7a17592feda257b4ede4ff2fc82
+ 6122ff8b03bcab3597dbd0c2259c846de000f193
-
+
https://github.com/dotnet/xharness
- ab2eee629494e7a17592feda257b4ede4ff2fc82
+ 6122ff8b03bcab3597dbd0c2259c846de000f193
diff --git a/eng/Versions.props b/eng/Versions.props
index 2e4367be54189..1b6d28fb00cf4 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -53,18 +53,18 @@
6.0.0-preview1.20513.4
3.8.0-4.20503.2
- 6.0.0-beta.20563.2
- 6.0.0-beta.20563.2
- 6.0.0-beta.20563.2
- 6.0.0-beta.20563.2
- 6.0.0-beta.20563.2
- 6.0.0-beta.20563.2
- 2.5.1-beta.20563.2
- 6.0.0-beta.20567.2
- 6.0.0-beta.20563.2
- 6.0.0-beta.20563.2
- 6.0.0-beta.20563.2
- 6.0.0-beta.20563.2
+ 6.0.0-beta.20573.2
+ 6.0.0-beta.20573.2
+ 6.0.0-beta.20573.2
+ 6.0.0-beta.20573.2
+ 6.0.0-beta.20573.2
+ 6.0.0-beta.20573.2
+ 2.5.1-beta.20573.2
+ 6.0.0-beta.20573.2
+ 6.0.0-beta.20573.2
+ 6.0.0-beta.20573.2
+ 6.0.0-beta.20573.2
+ 6.0.0-beta.20573.2
5.0.0-rc.1.20451.14
6.0.0-alpha.1.20501.4
@@ -106,15 +106,15 @@
4.3.0
5.0.0-alpha.1.19563.3
- 5.0.0-beta.20527.1
- 5.0.0-beta.20527.1
- 5.0.0-beta.20527.1
- 5.0.0-beta.20527.1
- 5.0.0-beta.20527.1
- 5.0.0-beta.20527.1
- 5.0.0-beta.20527.1
- 5.0.0-beta.20527.1
- 5.0.0-beta.20527.1
+ 5.0.0-beta.20568.1
+ 5.0.0-beta.20568.1
+ 5.0.0-beta.20568.1
+ 5.0.0-beta.20568.1
+ 5.0.0-beta.20568.1
+ 5.0.0-beta.20568.1
+ 5.0.0-beta.20568.1
+ 5.0.0-beta.20568.1
+ 5.0.0-beta.20568.1
2.2.0-prerelease.19564.1
2.0.3
@@ -140,8 +140,8 @@
1.0.1-prerelease-00006
16.8.0-release-20201022-02
- 1.0.0-prerelease.20559.2
- 1.0.0-prerelease.20559.2
+ 1.0.0-prerelease.20575.2
+ 1.0.0-prerelease.20575.2
2.4.1
2.4.2
1.3.0
@@ -154,16 +154,16 @@
6.0.0-alpha.1.20561.1
- 6.0.0-alpha.1.20552.1
+ 6.0.0-alpha.1.20573.1
- 9.0.1-alpha.1.20552.1
- 9.0.1-alpha.1.20552.1
- 9.0.1-alpha.1.20552.1
- 9.0.1-alpha.1.20552.1
- 9.0.1-alpha.1.20552.1
- 9.0.1-alpha.1.20552.1
- 9.0.1-alpha.1.20552.1
- 9.0.1-alpha.1.20552.1
+ 9.0.1-alpha.1.20573.1
+ 9.0.1-alpha.1.20573.1
+ 9.0.1-alpha.1.20573.1
+ 9.0.1-alpha.1.20573.1
+ 9.0.1-alpha.1.20573.1
+ 9.0.1-alpha.1.20573.1
+ 9.0.1-alpha.1.20573.1
+ 9.0.1-alpha.1.20573.1
diff --git a/eng/common/SetupNugetSources.ps1 b/eng/common/SetupNugetSources.ps1
index bb3617133f09e..a0b5fc37f4388 100644
--- a/eng/common/SetupNugetSources.ps1
+++ b/eng/common/SetupNugetSources.ps1
@@ -99,8 +99,9 @@ function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Username, $Passw
function EnablePrivatePackageSources($DisabledPackageSources) {
$maestroPrivateSources = $DisabledPackageSources.SelectNodes("add[contains(@key,'darc-int')]")
ForEach ($DisabledPackageSource in $maestroPrivateSources) {
- Write-Host "`tEnsuring private source '$($DisabledPackageSource.key)' is enabled"
- $DisabledPackageSource.SetAttribute("value", "false")
+ Write-Host "`tEnsuring private source '$($DisabledPackageSource.key)' is enabled by deleting it from disabledPackageSource"
+ # Due to https://github.com/NuGet/Home/issues/10291, we must actually remove the disabled entries
+ $DisabledPackageSources.RemoveChild($DisabledPackageSource)
}
}
diff --git a/eng/common/SetupNugetSources.sh b/eng/common/SetupNugetSources.sh
index ef33382954cff..2734601c13c4b 100644
--- a/eng/common/SetupNugetSources.sh
+++ b/eng/common/SetupNugetSources.sh
@@ -158,8 +158,8 @@ if [ "$?" == "0" ]; then
for DisabledSourceName in ${DisabledDarcIntSources[@]} ; do
if [[ $DisabledSourceName == darc-int* ]]
then
- OldDisableValue="add key=\"$DisabledSourceName\" value=\"true\""
- NewDisableValue="add key=\"$DisabledSourceName\" value=\"false\""
+ OldDisableValue=""
+ NewDisableValue=""
sed -i.bak "s|$OldDisableValue|$NewDisableValue|" $ConfigFile
echo "Neutralized disablePackageSources entry for '$DisabledSourceName'"
fi
diff --git a/eng/common/performance/crossgen_perf.proj b/eng/common/performance/crossgen_perf.proj
index cf09e40578a5b..eb8bdd9c440cd 100644
--- a/eng/common/performance/crossgen_perf.proj
+++ b/eng/common/performance/crossgen_perf.proj
@@ -19,7 +19,7 @@
python3
- $(HelixPreCommands);chmod +x $HELIX_WORKITEM_PAYLOAD/startup/Startup;chmod +x $HELIX_WORKITEM_PAYLOAD/startup/perfcollect;sudo apt update
+ $(HelixPreCommands);chmod +x $HELIX_WORKITEM_PAYLOAD/startup/Startup;chmod +x $HELIX_WORKITEM_PAYLOAD/startup/perfcollect;sudo apt update;chmod +x $HELIX_WORKITEM_PAYLOAD/SOD/SizeOnDisk
$HELIX_CORRELATION_PAYLOAD/Core_Root
$HELIX_CORRELATION_PAYLOAD/performance/src/scenarios/
$(ScenarioDirectory)crossgen/
@@ -69,7 +69,7 @@
$(WorkItemDirectory)
$(Python) $(CrossgenDirectory)pre.py crossgen --core-root $(CoreRoot) --single %(Identity)
- $(Python) $(CrossgenDirectory)test.py sod --scenario-name "Crossgen %(Identity) Size" --dirs ./crossgen/
+ $(Python) $(CrossgenDirectory)test.py sod --scenario-name "Crossgen %(Identity) Size" --dirs ./crossgen.out/
$(Python) $(CrossgenDirectory)post.py
@@ -78,7 +78,7 @@
$(WorkItemDirectory)
$(Python) $(Crossgen2Directory)pre.py crossgen2 --core-root $(CoreRoot) --single %(Identity)
- $(Python) $(Crossgen2Directory)test.py sod --scenario-name "Crossgen2 %(Identity) Size" --dirs ./crossgen/
+ $(Python) $(Crossgen2Directory)test.py sod --scenario-name "Crossgen2 %(Identity) Size" --dirs ./crossgen.out/
$(Python) $(Crossgen2Directory)post.py
diff --git a/eng/common/performance/performance-setup.sh b/eng/common/performance/performance-setup.sh
index 315815a967774..c8e211bcb1bb6 100755
--- a/eng/common/performance/performance-setup.sh
+++ b/eng/common/performance/performance-setup.sh
@@ -198,6 +198,12 @@ if [[ "$internal" == true ]]; then
else
queue=Ubuntu.1804.Amd64.Tiger.Perf
fi
+else
+ if [[ "$architecture" = "arm64" ]]; then
+ queue=ubuntu.1804.armarch.open
+ else
+ queue=Ubuntu.1804.Amd64.Open
+ fi
fi
if [[ "$mono_dotnet" != "" ]] && [[ "$monointerpreter" == "false" ]]; then
diff --git a/eng/common/post-build/sourcelink-validation.ps1 b/eng/common/post-build/sourcelink-validation.ps1
index 1728b742b3b7b..1c46f7b634148 100644
--- a/eng/common/post-build/sourcelink-validation.ps1
+++ b/eng/common/post-build/sourcelink-validation.ps1
@@ -164,7 +164,7 @@ function CheckJobResult(
[ref]$ValidationFailures,
[switch]$logErrors) {
if ($result -ne '0') {
- if ($logError) {
+ if ($logErrors) {
Write-PipelineTelemetryError -Category 'SourceLink' -Message "$packagePath has broken SourceLink links."
}
$ValidationFailures.Value++
diff --git a/eng/native/init-compiler-and-cmake.cmd b/eng/native/init-compiler-and-cmake.cmd
new file mode 100644
index 0000000000000..e579feca79e8a
--- /dev/null
+++ b/eng/native/init-compiler-and-cmake.cmd
@@ -0,0 +1,89 @@
+@if not defined _echo @echo off
+rem
+rem This file locates VS C++ compilers and cmake for windows.
+
+:SetupArgs
+:: Initialize the args that will be passed to cmake
+set __VCBuildArch=x86_amd64
+
+:Arg_Loop
+:: Since the native build requires some configuration information before msbuild is called, we have to do some manual args parsing
+if [%1] == [] goto :ToolsVersion
+if /i [%1] == [x86] ( set __VCBuildArch=x86&&shift&goto Arg_Loop)
+if /i [%1] == [arm] ( set __VCBuildArch=x86_arm&&shift&goto Arg_Loop)
+if /i [%1] == [x64] ( set __VCBuildArch=x86_amd64&&shift&goto Arg_Loop)
+if /i [%1] == [arm64] ( set __VCBuildArch=x86_arm64&&shift&goto Arg_Loop)
+
+shift
+goto :Arg_Loop
+
+:ToolsVersion
+:: Default to highest Visual Studio version available
+::
+:: For VS2017 and later, multiple instances can be installed on the same box SxS and VSxxxCOMNTOOLS is only set if the user
+:: has launched the VS2017 or VS2019 Developer Command Prompt.
+::
+:: Following this logic, we will default to the VS2017 or VS2019 toolset if VS150COMNTOOLS or VS160COMMONTOOLS tools is
+:: set, as this indicates the user is running from the VS2017 or VS2019 Developer Command Prompt and
+:: is already configured to use that toolset. Otherwise, we will fail the script if no supported VS instance can be found.
+
+if defined VisualStudioVersion goto :RunVCVars
+
+set _VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
+if exist %_VSWHERE% (
+ for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -prerelease -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools
+)
+if not exist "%_VSCOMNTOOLS%" goto :MissingVersion
+
+call "%_VSCOMNTOOLS%\VsDevCmd.bat" -no_logo
+
+:RunVCVars
+if "%VisualStudioVersion%"=="16.0" (
+ goto :VS2019
+) else if "%VisualStudioVersion%"=="15.0" (
+ goto :VS2017
+)
+
+:MissingVersion
+:: Can't find appropriate VS install
+echo Error: Visual Studio 2019 required
+echo Please see https://github.com/dotnet/runtime/tree/master/docs/workflow/building/libraries for build instructions.
+exit /b 1
+
+:VS2019
+:: Setup vars for VS2019
+set __VSVersion=vs2019
+set __PlatformToolset=v142
+:: Set the environment for the native build
+call "%VS160COMNTOOLS%..\..\VC\Auxiliary\Build\vcvarsall.bat" %__VCBuildArch%
+goto FindDIASDK
+
+:VS2017
+:: Setup vars for VS2017
+set __VSVersion=vs2017
+set __PlatformToolset=v141
+:: Set the environment for the native build
+call "%VS150COMNTOOLS%..\..\VC\Auxiliary\Build\vcvarsall.bat" %__VCBuildArch%
+goto FindDIASDK
+
+:FindDIASDK
+if exist "%VSINSTALLDIR%DIA SDK" goto CheckRepoRoot
+echo Error: DIA SDK is missing at "%VSINSTALLDIR%DIA SDK". ^
+Did you install all the requirements for building on Windows, including the "Desktop Development with C++" workload? ^
+Please see https://github.com/dotnet/runtime/blob/master/docs/workflow/requirements/windows-requirements.md ^
+Another possibility is that you have a parallel installation of Visual Studio and the DIA SDK is there. In this case it ^
+may help to copy its "DIA SDK" folder into "%VSINSTALLDIR%" manually, then try again.
+exit /b 1
+
+:CheckRepoRoot
+
+if exist "%__repoRoot%" goto :FindCMake
+:: Can't find repo root
+echo Error: variable __repoRoot not set.
+exit /b 1
+
+:FindCMake
+:: Find CMake
+
+:: Eval the output from set-cmake-path.ps1
+for /f "delims=" %%a in ('powershell -NoProfile -ExecutionPolicy ByPass "cd "%__repoRoot:"=%"; & eng\native\set-cmake-path.ps1"') do %%a
diff --git a/eng/native/init-distro-rid.sh b/eng/native/init-distro-rid.sh
index f5d14f2f7cd50..bddfb85f18d53 100644
--- a/eng/native/init-distro-rid.sh
+++ b/eng/native/init-distro-rid.sh
@@ -119,7 +119,6 @@ initNonPortableDistroRid()
#
# __DistroRid
# __PortableBuild
-# __RuntimeId
#
initDistroRidGlobal()
{
@@ -194,13 +193,8 @@ initDistroRidGlobal()
if [ -z "$__DistroRid" ]; then
echo "DistroRid is not set. This is almost certainly an error"
-
exit 1
- else
- echo "__DistroRid: ${__DistroRid}"
- echo "__RuntimeId: ${__DistroRid}"
-
- __RuntimeId="${__DistroRid}"
- export __RuntimeId
fi
+
+ echo "__DistroRid: ${__DistroRid}"
}
diff --git a/eng/native/naming.props b/eng/native/naming.props
index dbc7bc7cd9f88..7a02d6c6c6815 100644
--- a/eng/native/naming.props
+++ b/eng/native/naming.props
@@ -1,45 +1,54 @@
+
+ lib
+
+
-
+
- .exe
-
- .dll
- .lib
- .pdb
+ .exe
+ .dll
+ .lib
+ .pdb
-
+
- lib
- .dylib
- .a
- .dwarf
+ lib
+ .dylib
+ .a
+ .dwarf
-
+
- lib
- .so
- .a
+ lib
+ .so
+ .a
- .debug
+ .debug
- lib
- .so
- .a
- .dbg
+ lib
+ .so
+ .a
+ .dbg
-
-
+
+
+
+
+ $(SymbolsSuffix)
+
+
diff --git a/eng/pipelines/common/templates/runtimes/run-test-job.yml b/eng/pipelines/common/templates/runtimes/run-test-job.yml
index 5fd480b3a7250..66f3b40d7e843 100644
--- a/eng/pipelines/common/templates/runtimes/run-test-job.yml
+++ b/eng/pipelines/common/templates/runtimes/run-test-job.yml
@@ -472,6 +472,7 @@ jobs:
- jitobjectstackallocation
- jitpgo
- jitpgo_inline
+ - jitpgo_classes
${{ if in(parameters.testGroup, 'ilasm') }}:
scenarios:
- ilasmroundtrip
diff --git a/eng/pipelines/coreclr/perf.yml b/eng/pipelines/coreclr/perf.yml
index cf06bfbf503bc..320caffd43ae7 100644
--- a/eng/pipelines/coreclr/perf.yml
+++ b/eng/pipelines/coreclr/perf.yml
@@ -36,6 +36,7 @@ jobs:
- Linux_x64
- windows_x64
- windows_x86
+ - Linux_arm64
jobParameters:
testGroup: perf
@@ -130,6 +131,7 @@ jobs:
- Linux_x64
- windows_x64
- windows_x86
+ - Linux_arm64
jobParameters:
testGroup: perf
liveLibrariesBuildConfig: Release
diff --git a/eng/pipelines/coreclr/templates/build-job.yml b/eng/pipelines/coreclr/templates/build-job.yml
index 1ecc84e50ae0f..dae8c8a19177d 100644
--- a/eng/pipelines/coreclr/templates/build-job.yml
+++ b/eng/pipelines/coreclr/templates/build-job.yml
@@ -111,7 +111,7 @@ jobs:
- ${{ if eq(parameters.testGroup, 'clrinterpreter') }}:
- name: clrInterpreterBuildArg
value: '-cmakeargs "-DFEATURE_INTERPRETER=1"'
-
+
- name: clrBuildPALTestsBuildArg
value: ''
- ${{ if ne(parameters.testGroup, 'innerloop') }}:
@@ -123,7 +123,7 @@ jobs:
- ${{ if eq(parameters.osGroup, 'windows') }}:
- name: ninjaArg
value: '-ninja'
-
+
- name: SignType
value: $[ coalesce(variables.OfficialSignType, 'real') ]
@@ -170,7 +170,7 @@ jobs:
# Build DacTableGen (Windows-only)
- ${{ if eq(parameters.osGroup, 'windows') }}:
- script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subset clr.dactools $(crossArg) -arch $(archType) $(osArg) -c $(buildConfig) $(officialBuildIdArg) -ci /bl:$(Build.SourcesDirectory)artifacts/logs/$(buildConfig)/DacTools.binlog
- displayName: Build managed product components and packages
+ displayName: Build DAC utility tools
# Build CoreCLR Runtime
- ${{ if ne(parameters.osGroup, 'windows') }}:
@@ -225,7 +225,7 @@ jobs:
# Sign diagnostic files on Windows
- ${{ if and(eq(parameters.osGroup, 'windows'), eq(parameters.signBinaries, true)) }}:
- powershell: >-
- eng\common\build.ps1 -ci -sign -restore -configuration:$(buildConfig) -warnaserror:0
+ eng\common\build.ps1 -ci -sign -restore -configuration:$(buildConfig) -warnaserror:0 $(officialBuildIdArg)
/p:DiagnosticsFilesRoot="$(buildProductRootFolderPath)"
/p:SignDiagnostics=true
/p:DotNetSignType=$(SignType)
diff --git a/eng/pipelines/coreclr/templates/crossdac-pack.yml b/eng/pipelines/coreclr/templates/crossdac-pack.yml
index c782e363306f6..4309baa320367 100644
--- a/eng/pipelines/coreclr/templates/crossdac-pack.yml
+++ b/eng/pipelines/coreclr/templates/crossdac-pack.yml
@@ -77,7 +77,7 @@ jobs:
# Sign diagnostic files
- ${{ if eq(parameters.isOfficialBuild, true) }}:
- powershell: >-
- eng\common\build.ps1 -ci -sign -restore -configuration:$(buildConfig) -warnaserror:0
+ eng\common\build.ps1 -ci -sign -restore -configuration:$(buildConfig) -warnaserror:0 $(officialBuildIdArg)
/p:PackagesFolder="$(Build.SourcesDirectory)/artifacts/packages/$(buildConfig)"
/p:SignDiagnosticsPackages=true
/p:DotNetSignType=$(SignType)
diff --git a/eng/pipelines/runtime-official.yml b/eng/pipelines/runtime-official.yml
index 260a35e1c2414..a531b4642dc17 100644
--- a/eng/pipelines/runtime-official.yml
+++ b/eng/pipelines/runtime-official.yml
@@ -33,7 +33,7 @@ variables:
- name: _DotNetValidationArtifactsCategory
value: .NETCoreValidation
- name: PostBuildSign
- value: false
+ value: true
stages:
- stage: Build
diff --git a/eng/targetframeworksuffix.props b/eng/targetframeworksuffix.props
index 2525ce954a355..e4473df46fa74 100644
--- a/eng/targetframeworksuffix.props
+++ b/eng/targetframeworksuffix.props
@@ -77,7 +77,7 @@
true
- true
+ true
illumos
diff --git a/eng/testing/RunnerTemplate.cmd b/eng/testing/RunnerTemplate.cmd
index 10737eabe7095..9e6c6d1e7866b 100644
--- a/eng/testing/RunnerTemplate.cmd
+++ b/eng/testing/RunnerTemplate.cmd
@@ -56,7 +56,13 @@ pushd %EXECUTION_DIR%
@echo off
popd
echo ----- end %DATE% %TIME% ----- exit code %ERRORLEVEL% ----------------------------------------------------------
-exit /b %ERRORLEVEL%
+:: The helix work item should not exit with non-zero if tests ran and produced results
+:: The special console runner for runtime returns 1 when tests fail
+if %ERRORLEVEL%==1 (
+ exit /b 0
+) else (
+ exit /b %ERRORLEVEL%
+)
:: ========================= END Test Execution =================================
:usage
diff --git a/eng/testing/RunnerTemplate.sh b/eng/testing/RunnerTemplate.sh
index dbd5f4741a5d1..e4593e82433e0 100755
--- a/eng/testing/RunnerTemplate.sh
+++ b/eng/testing/RunnerTemplate.sh
@@ -204,4 +204,10 @@ if [[ "$(uname -s)" == "Linux" && $test_exitcode -ne 0 ]]; then
fi
popd >/dev/null
# ======================== END Core File Inspection ==========================
-exit $test_exitcode
+# The helix work item should not exit with non-zero if tests ran and produced results
+# The special console runner for runtime returns 1 when tests fail
+if [ "$test_exitcode" == "1" ]; then
+ exit 0
+else
+ exit $test_exitcode
+fi
diff --git a/eng/testing/tests.mobile.targets b/eng/testing/tests.mobile.targets
index 48ebda72e48bd..ef94fd017269a 100644
--- a/eng/testing/tests.mobile.targets
+++ b/eng/testing/tests.mobile.targets
@@ -116,6 +116,7 @@
MonoRuntimeHeaders="$(MicrosoftNetCoreAppRuntimePackNativeDir)include\mono-2.0"
Assemblies="@(BundleAssemblies)"
MainLibraryFileName="AppleTestRunner.dll"
+ ForceInterpreter="$(MonoForceInterpreter)"
UseConsoleUITemplate="True"
GenerateXcodeProject="True"
BuildAppBundle="True"
diff --git a/eng/versioning.targets b/eng/versioning.targets
index 3177b48b0ba6d..98fd08c850104 100644
--- a/eng/versioning.targets
+++ b/eng/versioning.targets
@@ -29,6 +29,15 @@
+
+ true
+
+
+
+
+
+
+
<_unsupportedOSPlatforms Include="$(UnsupportedOSPlatforms)" />
diff --git a/global.json b/global.json
index b08f3b4bc1703..c66815d170709 100644
--- a/global.json
+++ b/global.json
@@ -12,10 +12,10 @@
"python3": "3.7.1"
},
"msbuild-sdks": {
- "Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "6.0.0-beta.20563.2",
- "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.20563.2",
- "Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk": "6.0.0-beta.20563.2",
- "Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.20563.2",
+ "Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "6.0.0-beta.20573.2",
+ "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.20573.2",
+ "Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk": "6.0.0-beta.20573.2",
+ "Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.20573.2",
"Microsoft.DotNet.SharedFramework.Sdk": "6.0.0-beta.20552.5",
"Microsoft.NET.Sdk.IL": "6.0.0-alpha.1.20557.2",
"Microsoft.Build.NoTargets": "2.0.1",
diff --git a/src/coreclr/crossgen-corelib.proj b/src/coreclr/crossgen-corelib.proj
index 6144cbfaf08ee..f4ff62f016f26 100644
--- a/src/coreclr/crossgen-corelib.proj
+++ b/src/coreclr/crossgen-corelib.proj
@@ -20,12 +20,18 @@
System.Private.CoreLib
$(BinDir)\IL\$(CoreLibAssemblyName).dll
$(BinDir)\$(CoreLibAssemblyName).dll
+
+
+
+
x64
x86
- $(BuildArchitecture)
+ $(BuildArchitecture)
+
+
true
false
diff --git a/src/coreclr/dir.common.props b/src/coreclr/dir.common.props
index ebaf9645134ab..08e71350e9824 100644
--- a/src/coreclr/dir.common.props
+++ b/src/coreclr/dir.common.props
@@ -50,22 +50,6 @@
$(PackageVersion)
-
-
- true
- true
- true
- true
- true
- true
- true
-
- true
-
-
- $(__DistroRid)
-
-
Portable
diff --git a/src/coreclr/scripts/superpmi.py b/src/coreclr/scripts/superpmi.py
index 826871a061e02..dd0b4cf8a9e3a 100755
--- a/src/coreclr/scripts/superpmi.py
+++ b/src/coreclr/scripts/superpmi.py
@@ -141,7 +141,7 @@
superpmi_collect_help = """\
Command to run SuperPMI collect over. Note that there cannot be any dotnet CLI commands
-invoked inside this command, as they will fail due to the shim altjit being set.
+invoked inside this command, as they will fail due to the shim JIT being set.
"""
replay_mch_files_help = """\
@@ -750,9 +750,7 @@ def __collect_mc_files__(self):
env_copy = os.environ.copy()
env_copy["SuperPMIShimLogPath"] = self.temp_location
env_copy["SuperPMIShimPath"] = self.jit_path
- env_copy["COMPlus_AltJit"] = "*"
- env_copy["COMPlus_AltJitNgen"] = "*"
- env_copy["COMPlus_AltJitName"] = self.collection_shim_name
+ env_copy["COMPlus_JitName"] = self.collection_shim_name
env_copy["COMPlus_EnableExtraSuperPmiQueries"] = "1"
env_copy["COMPlus_TieredCompilation"] = "0"
@@ -764,9 +762,7 @@ def __collect_mc_files__(self):
logging.debug("")
print_platform_specific_environment_vars(logging.DEBUG, self.coreclr_args, "SuperPMIShimLogPath", self.temp_location)
print_platform_specific_environment_vars(logging.DEBUG, self.coreclr_args, "SuperPMIShimPath", self.jit_path)
- print_platform_specific_environment_vars(logging.DEBUG, self.coreclr_args, "COMPlus_AltJit", "*")
- print_platform_specific_environment_vars(logging.DEBUG, self.coreclr_args, "COMPlus_AltJitNgen", "*")
- print_platform_specific_environment_vars(logging.DEBUG, self.coreclr_args, "COMPlus_AltJitName", self.collection_shim_name)
+ print_platform_specific_environment_vars(logging.DEBUG, self.coreclr_args, "COMPlus_JitName", self.collection_shim_name)
print_platform_specific_environment_vars(logging.DEBUG, self.coreclr_args, "COMPlus_EnableExtraSuperPmiQueries", "1")
print_platform_specific_environment_vars(logging.DEBUG, self.coreclr_args, "COMPlus_TieredCompilation", "0")
if self.coreclr_args.use_zapdisable:
@@ -1072,36 +1068,38 @@ def replay(self):
logging.debug("Temp Location: %s", temp_location)
logging.debug("")
- flags = [
+ # `repro_flags` are the subset of flags we tell the user to pass to superpmi when reproducing
+ # a failure. This won't include things like "-p" for parallelism or "-r" to create a repro .mc file.
+ repro_flags = []
+
+ common_flags = [
"-v", "ew", # only display errors and warnings
"-r", os.path.join(temp_location, "repro") # Repro name, create .mc repro files
]
- altjit_string = "*" if self.coreclr_args.altjit else ""
- altjit_replay_flags = [
- "-jitoption", "force", "AltJit=" + altjit_string,
- "-jitoption", "force", "AltJitNgen=" + altjit_string,
- "-jitoption", "force", "EnableExtraSuperPmiQueries=0"
- ]
- flags += altjit_replay_flags
+ if self.coreclr_args.altjit:
+ repro_flags += [
+ "-jitoption", "force", "AltJit=*",
+ "-jitoption", "force", "AltJitNgen=*"
+ ]
+ if self.coreclr_args.arch == "arm":
+ repro_flags += [ "-target", "arm" ]
+ elif self.coreclr_args.arch == "arm64":
+ repro_flags += [ "-target", "arm64" ]
if not self.coreclr_args.sequential:
- flags += [ "-p" ]
+ common_flags += [ "-p" ]
if self.coreclr_args.break_on_assert:
- flags += [ "-boa" ]
+ common_flags += [ "-boa" ]
if self.coreclr_args.break_on_error:
- flags += [ "-boe" ]
+ common_flags += [ "-boe" ]
if self.coreclr_args.spmi_log_file is not None:
- flags += [ "-w", self.coreclr_args.spmi_log_file ]
+ common_flags += [ "-w", self.coreclr_args.spmi_log_file ]
- if self.coreclr_args.altjit:
- if self.coreclr_args.arch == "arm":
- flags += [ "-target", "arm" ]
- elif self.coreclr_args.arch == "arm64":
- flags += [ "-target", "arm64" ]
+ common_flags += repro_flags
# For each MCH file that we are going to replay, do the replay and replay post-processing.
#
@@ -1117,6 +1115,8 @@ def replay(self):
logging.info("Running SuperPMI replay of %s", mch_file)
+ flags = common_flags
+
fail_mcl_file = os.path.join(temp_location, os.path.basename(mch_file) + "_fail.mcl")
flags += [
"-f", fail_mcl_file, # Failing mc List
@@ -1136,7 +1136,7 @@ def replay(self):
if return_code == 0:
logging.warning("Warning: SuperPMI returned a zero exit code, but generated a non-zero-sized mcl file")
print_fail_mcl_file_method_numbers(fail_mcl_file)
- repro_base_command_line = "{} {} {}".format(self.superpmi_path, " ".join(altjit_replay_flags), self.jit_path)
+ repro_base_command_line = "{} {} {}".format(self.superpmi_path, " ".join(repro_flags), self.jit_path)
save_repro_mc_files(temp_location, self.coreclr_args, repro_base_command_line)
if not self.coreclr_args.skip_cleanup:
@@ -1238,22 +1238,27 @@ def replay_with_asm_diffs(self):
"COMPlus_JitDump": "*",
"COMPlus_NgenDump": "*" }
- altjit_string = "*" if self.coreclr_args.altjit else ""
-
- altjit_asm_diffs_flags = [
- "-jitoption", "force", "AltJit=" + altjit_string,
- "-jitoption", "force", "AltJitNgen=" + altjit_string,
- "-jitoption", "force", "EnableExtraSuperPmiQueries=0",
- "-jit2option", "force", "AltJit=" + altjit_string,
- "-jit2option", "force", "AltJitNgen=" + altjit_string,
- "-jit2option", "force", "EnableExtraSuperPmiQueries=0"
- ]
+ altjit_asm_diffs_flags = []
+ altjit_replay_flags = []
+
+ if self.coreclr_args.altjit:
+ target_flags = []
+ if self.coreclr_args.arch == "arm":
+ target_flags += [ "-target", "arm" ]
+ elif self.coreclr_args.arch == "arm64":
+ target_flags += [ "-target", "arm64" ]
+
+ altjit_asm_diffs_flags = target_flags + [
+ "-jitoption", "force", "AltJit=*",
+ "-jitoption", "force", "AltJitNgen=*",
+ "-jit2option", "force", "AltJit=*",
+ "-jit2option", "force", "AltJitNgen=*"
+ ]
- altjit_replay_flags = [
- "-jitoption", "force", "AltJit=" + altjit_string,
- "-jitoption", "force", "AltJitNgen=" + altjit_string,
- "-jitoption", "force", "EnableExtraSuperPmiQueries=0"
- ]
+ altjit_replay_flags = target_flags + [
+ "-jitoption", "force", "AltJit=*",
+ "-jitoption", "force", "AltJitNgen=*"
+ ]
# Keep track if any MCH file replay had asm diffs
files_with_asm_diffs = []
@@ -1304,12 +1309,6 @@ def replay_with_asm_diffs(self):
if self.coreclr_args.spmi_log_file is not None:
flags += [ "-w", self.coreclr_args.spmi_log_file ]
- if self.coreclr_args.altjit:
- if self.coreclr_args.arch == "arm":
- flags += [ "-target", "arm" ]
- elif self.coreclr_args.arch == "arm64":
- flags += [ "-target", "arm64" ]
-
# Change the working directory to the Core_Root we will call SuperPMI from.
# This is done to allow libcoredistools to be loaded correctly on unix
# as the loadlibrary path will be relative to the current directory.
@@ -2699,7 +2698,7 @@ def verify_replay_common_args():
"collection_args",
lambda unused: True,
"Unable to set collection_args",
- modify_arg=lambda collection_args: collection_args.split(" ") if collection_args is not None else collection_args)
+ modify_arg=lambda collection_args: collection_args.split(" ") if collection_args is not None else [])
coreclr_args.verify(args,
"pmi",
diff --git a/src/coreclr/src/.nuget/Directory.Build.props b/src/coreclr/src/.nuget/Directory.Build.props
index 3473cbf83b521..1e0b60ec47c4b 100644
--- a/src/coreclr/src/.nuget/Directory.Build.props
+++ b/src/coreclr/src/.nuget/Directory.Build.props
@@ -20,36 +20,14 @@
true
-
- <_parseDistroRid>$(__DistroRid)
- <_parseDistroRid Condition="'$(_parseDistroRid)' == '' and '$(TargetOS)' == 'OSX'">osx.10.12-x64
- <_distroRidIndex>$(_parseDistroRid.LastIndexOfAny("-"))
- <_archRidIndex>$([MSBuild]::Add($(_distroRidIndex), 1))
- $(_parseDistroRid.SubString(0, $(_distroRidIndex)))
- win10
-
- $(_parseDistroRid.SubString($(_archRidIndex)))
- $(Platform)
-
- $(OSRid)
-
windows;OSX;Android;Linux;FreeBSD;NetBSD;illumos;Solaris
;$(SupportedPackageOSGroups);
-
- <_runtimeOSVersionIndex>$(RuntimeOS.IndexOfAny(".-0123456789"))
- <_runtimeOSFamily Condition="'$(_runtimeOSVersionIndex)' != '-1'">$(RuntimeOS.SubString(0, $(_runtimeOSVersionIndex)))
- <_runtimeOSFamily Condition="'$(_runtimeOSVersionIndex)' == '-1'">$(RuntimeOS)
<_isSupportedOSGroup>true
- <_derivedPackageTargetOSGroup Condition="'$(_derivedPackageTargetOSGroup)' == '' and '$(_runtimeOSFamily)' == 'osx'">OSX
- <_derivedPackageTargetOSGroup Condition="'$(_derivedPackageTargetOSGroup)' == '' and '$(_runtimeOSFamily)' == 'android'">Android
- <_derivedPackageTargetOSGroup Condition="'$(_derivedPackageTargetOSGroup)' == '' and '$(_runtimeOSFamily)' == 'win'">windows
<_derivedPackageTargetOSGroup Condition="'$(_derivedPackageTargetOSGroup)' == '' and '$(TargetOS)' != ''">$(TargetOS)
<_derivedPackageTargetOSGroup Condition="'$(_derivedPackageTargetOSGroup)' == ''">Linux
@@ -73,92 +51,6 @@
true
-
-
-
-
-
- $(OutputRID)
-
-
-
-
-
- win-$(TargetArchitecture)
-
-
-
-
- osx.10.12-$(TargetArchitecture)
-
- osx-$(TargetArchitecture)
-
-
-
-
- freebsd.11-$(TargetArchitecture)
-
- freebsd-$(TargetArchitecture)
-
-
-
-
- netbsd-$(TargetArchitecture)
-
- netbsd-$(TargetArchitecture)
-
-
-
-
- illumos-$(TargetArchitecture)
-
- illumos-$(TargetArchitecture)
-
-
-
-
- solaris-$(TargetArchitecture)
-
- solaris-$(TargetArchitecture)
-
-
-
-
- android.21-$(TargetArchitecture)
-
- android-$(TargetArchitecture)
-
-
-
-
- $(OSRid)-$(TargetArchitecture)
-
- linux-$(TargetArchitecture)
-
-
-
-
- $(OSRid)-$(TargetArchitecture)
-
- linux-musl-$(TargetArchitecture)
-
-
-
-
- $(RuntimeOS)-$(TargetArchitecture)
-
-
-
-
- $(RuntimeOS)-$(TargetArchitecture)
-
- linux-$(TargetArchitecture)
-
-
-
-
-
-
diff --git a/src/coreclr/src/.nuget/Directory.Build.targets b/src/coreclr/src/.nuget/Directory.Build.targets
index f9886d59b0bbd..eeab2931cf837 100644
--- a/src/coreclr/src/.nuget/Directory.Build.targets
+++ b/src/coreclr/src/.nuget/Directory.Build.targets
@@ -9,8 +9,8 @@
Finds symbol files and injects them into the package build.
-->
-
-
+
+
@@ -42,7 +42,7 @@
-
+
diff --git a/src/coreclr/src/.nuget/Microsoft.NETCore.ILAsm/Microsoft.NETCore.ILAsm.pkgproj b/src/coreclr/src/.nuget/Microsoft.NETCore.ILAsm/Microsoft.NETCore.ILAsm.pkgproj
index ff68beebb047f..744c17ad28bb6 100644
--- a/src/coreclr/src/.nuget/Microsoft.NETCore.ILAsm/Microsoft.NETCore.ILAsm.pkgproj
+++ b/src/coreclr/src/.nuget/Microsoft.NETCore.ILAsm/Microsoft.NETCore.ILAsm.pkgproj
@@ -8,7 +8,7 @@
-
+
diff --git a/src/coreclr/src/.nuget/Microsoft.NETCore.ILDAsm/Microsoft.NETCore.ILDAsm.pkgproj b/src/coreclr/src/.nuget/Microsoft.NETCore.ILDAsm/Microsoft.NETCore.ILDAsm.pkgproj
index 116da5fd20dd2..8c6321fc7fd8c 100644
--- a/src/coreclr/src/.nuget/Microsoft.NETCore.ILDAsm/Microsoft.NETCore.ILDAsm.pkgproj
+++ b/src/coreclr/src/.nuget/Microsoft.NETCore.ILDAsm/Microsoft.NETCore.ILDAsm.pkgproj
@@ -8,7 +8,7 @@
-
+
diff --git a/src/coreclr/src/.nuget/Microsoft.NETCore.TestHost/Microsoft.NETCore.TestHost.pkgproj b/src/coreclr/src/.nuget/Microsoft.NETCore.TestHost/Microsoft.NETCore.TestHost.pkgproj
index aad674a250400..81b519f74bce8 100644
--- a/src/coreclr/src/.nuget/Microsoft.NETCore.TestHost/Microsoft.NETCore.TestHost.pkgproj
+++ b/src/coreclr/src/.nuget/Microsoft.NETCore.TestHost/Microsoft.NETCore.TestHost.pkgproj
@@ -8,7 +8,7 @@
-
+
diff --git a/src/coreclr/src/System.Private.CoreLib/System.Private.CoreLib.csproj b/src/coreclr/src/System.Private.CoreLib/System.Private.CoreLib.csproj
index 4de4ac0aa5860..1b227e0521ddb 100644
--- a/src/coreclr/src/System.Private.CoreLib/System.Private.CoreLib.csproj
+++ b/src/coreclr/src/System.Private.CoreLib/System.Private.CoreLib.csproj
@@ -220,6 +220,7 @@
+
diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs
index e7ca19e8076e3..a9505dc646664 100644
--- a/src/coreclr/src/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs
+++ b/src/coreclr/src/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs
@@ -377,7 +377,7 @@ private static Type[] GetIndexParameterTypes(PropertyInfo element)
return indexParamTypes;
}
- return Array.Empty();
+ return Type.EmptyTypes;
}
private static void AddAttributesToList(List attributeList, Attribute[] attributes, Dictionary types)
diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.CoreCLR.cs
index 5e7dd7ddc4534..da6adab43e2f2 100644
--- a/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.CoreCLR.cs
+++ b/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.CoreCLR.cs
@@ -27,7 +27,7 @@ private static IArraySortHelper CreateArraySortHelper()
if (typeof(IComparable).IsAssignableFrom(typeof(T)))
{
- defaultArraySortHelper = (IArraySortHelper)RuntimeTypeHandle.Allocate(typeof(GenericArraySortHelper).TypeHandle.Instantiate(new Type[] { typeof(T) }));
+ defaultArraySortHelper = (IArraySortHelper)RuntimeTypeHandle.CreateInstanceForAnotherGenericParameter((RuntimeType)typeof(GenericArraySortHelper), (RuntimeType)typeof(T));
}
else
{
@@ -62,7 +62,7 @@ private static IArraySortHelper CreateArraySortHelper()
if (typeof(IComparable).IsAssignableFrom(typeof(TKey)))
{
- defaultArraySortHelper = (IArraySortHelper)RuntimeTypeHandle.Allocate(typeof(GenericArraySortHelper).TypeHandle.Instantiate(new Type[] { typeof(TKey), typeof(TValue) }));
+ defaultArraySortHelper = (IArraySortHelper)RuntimeTypeHandle.CreateInstanceForAnotherGenericParameter((RuntimeType)typeof(GenericArraySortHelper), (RuntimeType)typeof(TKey), (RuntimeType)typeof(TValue));
}
else
{
diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/CustomAttributeBuilder.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/CustomAttributeBuilder.cs
index 51487b02a4c0b..586e1e55929b6 100644
--- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/CustomAttributeBuilder.cs
+++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/CustomAttributeBuilder.cs
@@ -168,7 +168,7 @@ public CustomAttributeBuilder(ConstructorInfo con, object?[] constructorArgs, Pr
}
// Make sure the property's type can take the given value.
- // Note that there will be no coersion.
+ // Note that there will be no coercion.
if (propertyValue != null)
{
VerifyTypeAndPassedObjectType(propType, propertyValue.GetType(), $"{nameof(propertyValues)}[{i}]");
@@ -222,7 +222,7 @@ public CustomAttributeBuilder(ConstructorInfo con, object?[] constructorArgs, Pr
}
// Make sure the field's type can take the given value.
- // Note that there will be no coersion.
+ // Note that there will be no coercion.
if (fieldValue != null)
{
VerifyTypeAndPassedObjectType(fldType, fieldValue.GetType(), $"{nameof(fieldValues)}[{i}]");
@@ -271,9 +271,7 @@ private bool ValidateType(Type t)
}
if (t.IsArray)
{
- if (t.GetArrayRank() != 1)
- return false;
- return ValidateType(t.GetElementType()!);
+ return t.GetArrayRank() == 1 && ValidateType(t.GetElementType()!);
}
return t == typeof(object);
}
diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/DynamicILGenerator.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/DynamicILGenerator.cs
index 693a2937c152b..3e11afaec3e16 100644
--- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/DynamicILGenerator.cs
+++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/DynamicILGenerator.cs
@@ -482,20 +482,12 @@ internal override SignatureHelper GetMemberRefSignature(
Type[][]? optionalCustomModifiers,
Type[]? optionalParameterTypes)
{
- SignatureHelper sig = SignatureHelper.GetMethodSigHelper(call, returnType);
- if (parameterTypes != null)
- {
- for (int i = 0; i < parameterTypes.Length; i++)
- {
- sig.AddArgument(parameterTypes[i], requiredCustomModifiers![i], optionalCustomModifiers![i]);
- }
- }
+ SignatureHelper sig = SignatureHelper.GetMethodSigHelper(null, call, returnType, null, null, parameterTypes, requiredCustomModifiers, optionalCustomModifiers);
+
if (optionalParameterTypes != null && optionalParameterTypes.Length != 0)
{
- // add the sentinel
sig.AddSentinel();
- foreach (Type t in optionalParameterTypes)
- sig.AddArgument(t);
+ sig.AddArguments(optionalParameterTypes, null, null);
}
return sig;
}
diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/MethodBuilder.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/MethodBuilder.cs
index e99c584074c1f..0807751b2999b 100644
--- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/MethodBuilder.cs
+++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/MethodBuilder.cs
@@ -268,7 +268,7 @@ internal void ReleaseBakedStructures()
m_exceptions = null;
}
- internal override Type[] GetParameterTypes() => m_parameterTypes ??= Array.Empty();
+ internal override Type[] GetParameterTypes() => m_parameterTypes ??= Type.EmptyTypes;
internal static Type? GetMethodBaseReturnType(MethodBase? method)
{
@@ -306,7 +306,7 @@ internal void SetToken(int token)
internal SignatureHelper GetMethodSignature()
{
- m_parameterTypes ??= Array.Empty();
+ m_parameterTypes ??= Type.EmptyTypes;
m_signature = SignatureHelper.GetMethodSigHelper(m_module, m_callingConvention, m_inst != null ? m_inst.Length : 0,
m_returnType, m_returnTypeRequiredCustomModifiers, m_returnTypeOptionalCustomModifiers,
@@ -538,7 +538,7 @@ public override bool IsDefined(Type attributeType, bool inherit)
public override bool IsGenericMethod => m_inst != null;
- public override Type[] GetGenericArguments() => m_inst ?? Array.Empty();
+ public override Type[] GetGenericArguments() => m_inst ?? Type.EmptyTypes;
public override MethodInfo MakeGenericMethod(params Type[] typeArguments)
{
diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.cs
index 6127c59478064..5e1f30842308c 100644
--- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.cs
+++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.cs
@@ -417,32 +417,14 @@ private int GetMemberRefToken(MethodBase method, Type[]? optionalParameterTypes)
internal SignatureHelper GetMemberRefSignature(CallingConventions call, Type? returnType,
Type[]? parameterTypes, Type[][]? requiredCustomModifiers, Type[][]? optionalCustomModifiers,
- IEnumerable? optionalParameterTypes, int cGenericParameters)
+ Type[]? optionalParameterTypes, int cGenericParameters)
{
- SignatureHelper sig = SignatureHelper.GetMethodSigHelper(this, call, returnType, cGenericParameters);
+ SignatureHelper sig = SignatureHelper.GetMethodSigHelper(this, call, cGenericParameters, returnType, null, null, parameterTypes, requiredCustomModifiers, optionalCustomModifiers);
- if (parameterTypes != null)
+ if (optionalParameterTypes != null && optionalParameterTypes.Length != 0)
{
- for (int i = 0; i < parameterTypes.Length; i++)
- {
- sig.AddArgument(parameterTypes[i], requiredCustomModifiers![i], optionalCustomModifiers![i]);
- }
- }
-
- if (optionalParameterTypes != null)
- {
- int i = 0;
- foreach (Type type in optionalParameterTypes)
- {
- // add the sentinel
- if (i == 0)
- {
- sig.AddSentinel();
- }
-
- sig.AddArgument(type);
- i++;
- }
+ sig.AddSentinel();
+ sig.AddArguments(optionalParameterTypes, null, null);
}
return sig;
diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/SymbolMethod.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/SymbolMethod.cs
index 9e9aab8fcac4b..10ae4bca5f7dc 100644
--- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/SymbolMethod.cs
+++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/SymbolMethod.cs
@@ -39,7 +39,7 @@ internal SymbolMethod(ModuleBuilder mod, int token, Type arrayClass, string meth
}
else
{
- m_parameterTypes = Array.Empty();
+ m_parameterTypes = Type.EmptyTypes;
}
m_module = mod;
diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.cs
index d485dc69c1cc4..d87985db96d3c 100644
--- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.cs
+++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.cs
@@ -846,7 +846,7 @@ public override Type[] GetInterfaces()
if (m_typeInterfaces == null)
{
- return Array.Empty();
+ return Type.EmptyTypes;
}
return m_typeInterfaces.ToArray();
@@ -1188,7 +1188,7 @@ public override Type MakeGenericType(params Type[] typeArguments)
return TypeBuilderInstantiation.MakeGenericType(this, typeArguments);
}
- public override Type[] GetGenericArguments() => m_inst ?? Array.Empty();
+ public override Type[] GetGenericArguments() => m_inst ?? Type.EmptyTypes;
// If a TypeBuilder is generic, it must be a generic type definition
// All instantiated generic types are TypeBuilderInstantiation.
diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/MdFieldInfo.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/MdFieldInfo.cs
index e4d240d598ba9..7d5a8f9f64cc7 100644
--- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/MdFieldInfo.cs
+++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/MdFieldInfo.cs
@@ -113,12 +113,12 @@ public override Type FieldType
public override Type[] GetRequiredCustomModifiers()
{
- return Array.Empty();
+ return Type.EmptyTypes;
}
public override Type[] GetOptionalCustomModifiers()
{
- return Array.Empty();
+ return Type.EmptyTypes;
}
#endregion
diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.cs
index 9dfffd64a2e2c..e0d87e7821d8e 100644
--- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.cs
+++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.cs
@@ -579,7 +579,7 @@ internal RuntimeType[] GetGenericArgumentsInternal() =>
RuntimeMethodHandle.GetMethodInstantiationInternal(this);
public override Type[] GetGenericArguments() =>
- RuntimeMethodHandle.GetMethodInstantiationPublic(this) ?? Array.Empty();
+ RuntimeMethodHandle.GetMethodInstantiationPublic(this) ?? Type.EmptyTypes;
public override MethodInfo GetGenericMethodDefinition()
{
diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.CoreCLR.cs
index 6b6e4639bfec2..95de9b788bfcb 100644
--- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.CoreCLR.cs
+++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.CoreCLR.cs
@@ -80,6 +80,9 @@ public static void PrepareMethod(RuntimeMethodHandle method)
public static void PrepareMethod(RuntimeMethodHandle method, RuntimeTypeHandle[]? instantiation)
{
+ // defensive copy of user-provided array, per CopyRuntimeTypeHandles contract
+ instantiation = (RuntimeTypeHandle[]?)instantiation?.Clone();
+
unsafe
{
IntPtr[]? instantiationHandles = RuntimeTypeHandle.CopyRuntimeTypeHandles(instantiation, out int length);
@@ -287,8 +290,9 @@ public static IntPtr AllocateTypeAssociatedMemory(Type type, int size)
private static extern IntPtr AllocTailCallArgBuffer(int size, IntPtr gcDesc);
[MethodImpl(MethodImplOptions.InternalCall)]
- private static unsafe extern TailCallTls* GetTailCallInfo(IntPtr retAddrSlot, IntPtr* retAddr);
+ private static extern unsafe TailCallTls* GetTailCallInfo(IntPtr retAddrSlot, IntPtr* retAddr);
+ [StackTraceHidden]
private static unsafe void DispatchTailCalls(
IntPtr callersRetAddrSlot,
delegate* callTarget,
diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/RuntimeHandles.cs b/src/coreclr/src/System.Private.CoreLib/src/System/RuntimeHandles.cs
index adc808e43de5a..f8ff5504380a7 100644
--- a/src/coreclr/src/System.Private.CoreLib/src/System/RuntimeHandles.cs
+++ b/src/coreclr/src/System.Private.CoreLib/src/System/RuntimeHandles.cs
@@ -162,6 +162,12 @@ internal static bool HasElementType(RuntimeType type)
|| (corElemType == CorElementType.ELEMENT_TYPE_BYREF); // IsByRef
}
+ // ** WARNING **
+ // Caller bears responsibility for ensuring that the provided Types remain
+ // GC-reachable while the unmanaged handles are being manipulated. The caller
+ // may need to make a defensive copy of the input array to ensure it's not
+ // mutated by another thread, and this defensive copy should be passed to
+ // a KeepAlive routine.
internal static IntPtr[]? CopyRuntimeTypeHandles(RuntimeTypeHandle[]? inHandles, out int length)
{
if (inHandles == null || inHandles.Length == 0)
@@ -179,6 +185,12 @@ internal static bool HasElementType(RuntimeType type)
return outHandles;
}
+ // ** WARNING **
+ // Caller bears responsibility for ensuring that the provided Types remain
+ // GC-reachable while the unmanaged handles are being manipulated. The caller
+ // may need to make a defensive copy of the input array to ensure it's not
+ // mutated by another thread, and this defensive copy should be passed to
+ // a KeepAlive routine.
internal static IntPtr[]? CopyRuntimeTypeHandles(Type[]? inHandles, out int length)
{
if (inHandles == null || inHandles.Length == 0)
@@ -196,14 +208,94 @@ internal static bool HasElementType(RuntimeType type)
return outHandles;
}
- [MethodImpl(MethodImplOptions.InternalCall)]
- internal static extern object CreateInstance(RuntimeType type, bool publicOnly, bool wrapExceptions, ref bool canBeCached, ref RuntimeMethodHandleInternal ctor, ref bool hasNoDefaultCtor);
+ internal static object CreateInstanceForAnotherGenericParameter(RuntimeType type, RuntimeType genericParameter)
+ {
+ object? instantiatedObject = null;
- [MethodImpl(MethodImplOptions.InternalCall)]
- internal static extern object Allocate(RuntimeType type);
+ IntPtr typeHandle = genericParameter.GetTypeHandleInternal().Value;
+ CreateInstanceForAnotherGenericParameter(
+ new QCallTypeHandle(ref type),
+ &typeHandle,
+ 1,
+ ObjectHandleOnStack.Create(ref instantiatedObject));
+
+ GC.KeepAlive(genericParameter);
+ return instantiatedObject!;
+ }
+
+ internal static object CreateInstanceForAnotherGenericParameter(RuntimeType type, RuntimeType genericParameter1, RuntimeType genericParameter2)
+ {
+ object? instantiatedObject = null;
+
+ IntPtr* pTypeHandles = stackalloc IntPtr[]
+ {
+ genericParameter1.GetTypeHandleInternal().Value,
+ genericParameter2.GetTypeHandleInternal().Value
+ };
+
+ CreateInstanceForAnotherGenericParameter(
+ new QCallTypeHandle(ref type),
+ pTypeHandles,
+ 2,
+ ObjectHandleOnStack.Create(ref instantiatedObject));
+
+ GC.KeepAlive(genericParameter1);
+ GC.KeepAlive(genericParameter2);
+
+ return instantiatedObject!;
+ }
+
+ [DllImport(RuntimeHelpers.QCall, CharSet = CharSet.Unicode)]
+ private static extern void CreateInstanceForAnotherGenericParameter(
+ QCallTypeHandle baseType,
+ IntPtr* pTypeHandles,
+ int cTypeHandles,
+ ObjectHandleOnStack instantiatedObject);
+
+ ///
+ /// Given a RuntimeType, returns information about how to activate it via calli
+ /// semantics. This method will ensure the type object is fully initialized within
+ /// the VM, but it will not call any static ctors on the type.
+ ///
+ internal static void GetActivationInfo(
+ RuntimeType rt,
+ out delegate* pfnAllocator,
+ out void* vAllocatorFirstArg,
+ out delegate*
-
-
-
-
-
- .a
- .lib
-
-
-
-
-
-
-
-
-
-
diff --git a/src/coreclr/src/tools/aot/jitinterface/jitinterface.h b/src/coreclr/src/tools/aot/jitinterface/jitinterface.h
index ecb7e88915b70..37828567f2b6c 100644
--- a/src/coreclr/src/tools/aot/jitinterface/jitinterface.h
+++ b/src/coreclr/src/tools/aot/jitinterface/jitinterface.h
@@ -171,6 +171,7 @@ struct JitInterfaceCallbacks
void (* reportFatalError)(void * thisHandle, CorInfoException** ppException, int result);
int (* allocMethodBlockCounts)(void * thisHandle, CorInfoException** ppException, unsigned int count, void** pBlockCounts);
int (* getMethodBlockCounts)(void * thisHandle, CorInfoException** ppException, void* ftnHnd, unsigned int* pCount, void** pBlockCounts, unsigned int* pNumRuns);
+ void* (* getLikelyClass)(void * thisHandle, CorInfoException** ppException, void* ftnHnd, void* baseHnd, unsigned int ilOffset, unsigned int* pLikelihood, unsigned int* pNumberOfClasses);
void (* recordCallSite)(void * thisHandle, CorInfoException** ppException, unsigned int instrOffset, void* callSig, void* methodHandle);
void (* recordRelocation)(void * thisHandle, CorInfoException** ppException, void* location, void* target, unsigned short fRelocType, unsigned short slotNum, int addlDelta);
unsigned short (* getRelocTypeHint)(void * thisHandle, CorInfoException** ppException, void* target);
@@ -1608,6 +1609,15 @@ class JitInterfaceWrapper
return _ret;
}
+ virtual void* getLikelyClass(void* ftnHnd, void* baseHnd, unsigned int ilOffset, unsigned int* pLikelihood, unsigned int* pNumberOfClasses)
+ {
+ CorInfoException* pException = nullptr;
+ void* _ret = _callbacks->getLikelyClass(_thisHandle, &pException, ftnHnd, baseHnd, ilOffset, pLikelihood, pNumberOfClasses);
+ if (pException != nullptr)
+ throw pException;
+ return _ret;
+ }
+
virtual void recordCallSite(unsigned int instrOffset, void* callSig, void* methodHandle)
{
CorInfoException* pException = nullptr;
diff --git a/src/coreclr/src/tools/aot/jitinterface/jitwrapper.cpp b/src/coreclr/src/tools/aot/jitinterface/jitwrapper.cpp
index cdb4543d672bf..f922a50c4a394 100644
--- a/src/coreclr/src/tools/aot/jitinterface/jitwrapper.cpp
+++ b/src/coreclr/src/tools/aot/jitinterface/jitwrapper.cpp
@@ -26,11 +26,11 @@ class CORJIT_FLAGS
uint64_t corJitFlags;
};
-static const GUID JITEEVersionIdentifier ={ /* 8031aa05-4568-40fc-a0d2-d971d8edba16 */
- 0x8031aa05,
- 0x4568,
- 0x40fc,
- {0xa0, 0xd2, 0xd9, 0x71, 0xd8, 0xed, 0xba, 0x16}
+static const GUID JITEEVersionIdentifier = { /* 0d235fe4-65a1-487a-8553-c845496da901 */
+ 0x0d235fe4,
+ 0x65a1,
+ 0x487a,
+ {0x85, 0x53, 0xc8, 0x45, 0x49, 0x6d, 0xa9, 0x01}
};
class Jit
diff --git a/src/coreclr/src/tools/dotnet-pgo/Microsoft.Diagnostics.JitTrace/JitTraceRuntime.cs b/src/coreclr/src/tools/dotnet-pgo/Microsoft.Diagnostics.JitTrace/JitTraceRuntime.cs
index 68a0febb281d4..d817bd437b44a 100644
--- a/src/coreclr/src/tools/dotnet-pgo/Microsoft.Diagnostics.JitTrace/JitTraceRuntime.cs
+++ b/src/coreclr/src/tools/dotnet-pgo/Microsoft.Diagnostics.JitTrace/JitTraceRuntime.cs
@@ -120,7 +120,7 @@ public static void Prepare(StreamReader jittraceStream, out int successfulPrepar
int signatureLen = int.Parse(methodStrComponents[2]);
string[] methodInstantiationArgComponents = SplitAndUnescape(methodStrComponents[3], innerCsvEscapeChar, innerCsvEscapeCharArray);
int genericMethodArgCount = int.Parse(methodInstantiationArgComponents[0]);
- Type[] methodArgs = genericMethodArgCount != 0 ? new Type[genericMethodArgCount] : Array.Empty();
+ Type[] methodArgs = genericMethodArgCount != 0 ? new Type[genericMethodArgCount] : Type.EmptyTypes;
bool abortMethodDiscovery = false;
for (int iMethodArg = 0; iMethodArg < genericMethodArgCount; iMethodArg++)
{
diff --git a/src/coreclr/src/tools/r2rdump/TextDumper.cs b/src/coreclr/src/tools/r2rdump/TextDumper.cs
index a292d23792725..bf36df822ab2a 100644
--- a/src/coreclr/src/tools/r2rdump/TextDumper.cs
+++ b/src/coreclr/src/tools/r2rdump/TextDumper.cs
@@ -161,8 +161,7 @@ internal override void DumpMethod(ReadyToRunMethod method)
if (_options.Raw)
{
- // TODO: Output RVAs for consistency with other DumpBytes calls
- DumpBytes(gcInfo.Offset, (uint)gcInfo.Size, "", false);
+ DumpBytes(method.GcInfoRva, (uint)gcInfo.Size);
}
}
SkipLine();
diff --git a/src/coreclr/src/utilcode/stresslog.cpp b/src/coreclr/src/utilcode/stresslog.cpp
index 7d01fc09ca6bd..108080455d79f 100644
--- a/src/coreclr/src/utilcode/stresslog.cpp
+++ b/src/coreclr/src/utilcode/stresslog.cpp
@@ -151,7 +151,7 @@ void StressLog::Initialize(unsigned facilities, unsigned level, unsigned maxByt
return;
}
- theLog.lock = ClrCreateCriticalSection(CrstStressLog,(CrstFlags)(CRST_UNSAFE_ANYMODE|CRST_DEBUGGER_THREAD));
+ theLog.lock = ClrCreateCriticalSection(CrstStressLog,(CrstFlags)(CRST_UNSAFE_ANYMODE|CRST_DEBUGGER_THREAD|CRST_TAKEN_DURING_SHUTDOWN));
// StressLog::Terminate is going to free memory.
if (maxBytesPerThread < STRESSLOG_CHUNK_SIZE)
{
diff --git a/src/coreclr/src/vm/bundle.cpp b/src/coreclr/src/vm/bundle.cpp
index 3a204deb2cfb5..373ab591b432d 100644
--- a/src/coreclr/src/vm/bundle.cpp
+++ b/src/coreclr/src/vm/bundle.cpp
@@ -30,25 +30,26 @@ const SString &BundleFileLocation::Path() const
return Bundle::AppBundle->Path();
}
-Bundle::Bundle(LPCWSTR bundlePath, BundleProbe *probe)
+Bundle::Bundle(LPCSTR bundlePath, BundleProbe *probe)
{
STANDARD_VM_CONTRACT;
_ASSERTE(probe != nullptr);
- m_path.Set(bundlePath);
+ m_path.SetUTF8(bundlePath);
m_probe = probe;
// The bundle-base path is the directory containing the single-file bundle.
// When the Probe() function searches within the bundle, it masks out the basePath from the assembly-path (if found).
- LPCWSTR pos = wcsrchr(bundlePath, DIRECTORY_SEPARATOR_CHAR_W);
+ LPCSTR pos = strrchr(bundlePath, DIRECTORY_SEPARATOR_CHAR_A);
_ASSERTE(pos != nullptr);
- size_t baseLen = pos - bundlePath + 1; // Include DIRECTORY_SEPARATOR_CHAR_W in m_basePath
- m_basePath.Set(bundlePath, (COUNT_T)baseLen);
+ size_t baseLen = pos - bundlePath + 1; // Include DIRECTORY_SEPARATOR_CHAR_A in m_basePath
+ m_basePath.SetUTF8(bundlePath, (COUNT_T)baseLen);
+ m_basePathLength = (COUNT_T)baseLen;
}
-BundleFileLocation Bundle::Probe(LPCWSTR path, bool pathIsBundleRelative) const
+BundleFileLocation Bundle::Probe(const SString& path, bool pathIsBundleRelative) const
{
STANDARD_VM_CONTRACT;
@@ -59,17 +60,18 @@ BundleFileLocation Bundle::Probe(LPCWSTR path, bool pathIsBundleRelative) const
// Bundle.Probe("path/to/exe/lib.dll") => m_probe("lib.dll")
// Bundle.Probe("path/to/exe/and/some/more/lib.dll") => m_probe("and/some/more/lib.dll")
+ StackScratchBuffer scratchBuffer;
+ LPCSTR utf8Path(path.GetUTF8(scratchBuffer));
+
if (!pathIsBundleRelative)
{
- size_t baseLen = m_basePath.GetCount();
-
#ifdef TARGET_UNIX
- if (wcsncmp(m_basePath, path, baseLen) == 0)
+ if (wcsncmp(m_basePath, path, m_basePath.GetCount()) == 0)
#else
- if (_wcsnicmp(m_basePath, path, baseLen) == 0)
+ if (_wcsnicmp(m_basePath, path, m_basePath.GetCount()) == 0)
#endif // TARGET_UNIX
{
- path += baseLen; // m_basePath includes count for DIRECTORY_SEPARATOR_CHAR_W
+ utf8Path += m_basePathLength; // m_basePath includes count for DIRECTORY_SEPARATOR_CHAR_W
}
else
{
@@ -78,15 +80,14 @@ BundleFileLocation Bundle::Probe(LPCWSTR path, bool pathIsBundleRelative) const
}
}
- m_probe(path, &loc.Offset, &loc.Size);
+ m_probe(utf8Path, &loc.Offset, &loc.Size);
return loc;
}
-BundleFileLocation Bundle::ProbeAppBundle(LPCWSTR path, bool pathIsBundleRelative)
+BundleFileLocation Bundle::ProbeAppBundle(const SString& path, bool pathIsBundleRelative)
{
STANDARD_VM_CONTRACT;
return AppIsBundle() ? AppBundle->Probe(path, pathIsBundleRelative) : BundleFileLocation::Invalid();
}
-
diff --git a/src/coreclr/src/vm/ceeload.h b/src/coreclr/src/vm/ceeload.h
index 4ac12e59f6451..f87e843125484 100644
--- a/src/coreclr/src/vm/ceeload.h
+++ b/src/coreclr/src/vm/ceeload.h
@@ -3282,7 +3282,7 @@ class ReflectionModule : public Module
void Destruct();
#endif // !DACCESS_COMPILE && !CROSSGEN_COMPILE
- // Overides functions to access sections
+ // Overrides functions to access sections
virtual TADDR GetIL(RVA target);
virtual PTR_VOID GetRvaField(RVA rva, BOOL fZapped);
diff --git a/src/coreclr/src/vm/codeman.cpp b/src/coreclr/src/vm/codeman.cpp
index 8fb9fdea1197b..c4f00736defb5 100644
--- a/src/coreclr/src/vm/codeman.cpp
+++ b/src/coreclr/src/vm/codeman.cpp
@@ -1557,6 +1557,39 @@ struct JIT_LOAD_DATA
// Here's the global data for JIT load and initialization state.
JIT_LOAD_DATA g_JitLoadData;
+// Validate that the name used to load the JIT is just a simple file name
+// and does not contain something that could be used in a non-qualified path.
+// For example, using the string "..\..\..\myjit.dll" we might attempt to
+// load a JIT from the root of the drive.
+//
+// The minimal set of characters that we must check for and exclude are:
+// '\\' - (backslash)
+// '/' - (forward slash)
+// ':' - (colon)
+//
+// Returns false if we find any of these characters in 'pwzJitName'
+// Returns true if we reach the null terminator without encountering
+// any of these characters.
+//
+static bool ValidateJitName(LPCWSTR pwzJitName)
+{
+ LPCWSTR pCurChar = pwzJitName;
+ wchar_t curChar;
+ do {
+ curChar = *pCurChar;
+ if ((curChar == '\\') || (curChar == '/') || (curChar == ':'))
+ {
+ // Return false if we find any of these character in 'pwzJitName'
+ return false;
+ }
+ pCurChar++;
+ } while (curChar != 0);
+
+ // Return true; we have reached the null terminator
+ //
+ return true;
+}
+
// LoadAndInitializeJIT: load the JIT dll into the process, and initialize it (call the UtilCode initialization function,
// check the JIT-EE interface GUID, etc.)
//
@@ -1589,34 +1622,40 @@ static void LoadAndInitializeJIT(LPCWSTR pwzJitName, OUT HINSTANCE* phJit, OUT I
*phJit = NULL;
*ppICorJitCompiler = NULL;
- HRESULT hr = E_FAIL;
-
- PathString CoreClrFolderHolder;
- bool havePath = false;
-
- if (GetClrModulePathName(CoreClrFolderHolder))
+ if (pwzJitName == nullptr)
{
- // Load JIT from next to CoreCLR binary
- havePath = true;
+ pJitLoadData->jld_hr = E_FAIL;
+ LOG((LF_JIT, LL_FATALERROR, "LoadAndInitializeJIT: pwzJitName is null"));
+ return;
}
- if (havePath && !CoreClrFolderHolder.IsEmpty())
+ HRESULT hr = E_FAIL;
+
+ if (ValidateJitName(pwzJitName))
{
- SString::Iterator iter = CoreClrFolderHolder.End();
- BOOL findSep = CoreClrFolderHolder.FindBack(iter, DIRECTORY_SEPARATOR_CHAR_W);
- if (findSep)
+ // Load JIT from next to CoreCLR binary
+ PathString CoreClrFolderHolder;
+ if (GetClrModulePathName(CoreClrFolderHolder) && !CoreClrFolderHolder.IsEmpty())
{
- SString sJitName(pwzJitName);
- CoreClrFolderHolder.Replace(iter + 1, CoreClrFolderHolder.End() - (iter + 1), sJitName);
-
- *phJit = CLRLoadLibrary(CoreClrFolderHolder.GetUnicode());
- if (*phJit != NULL)
+ SString::Iterator iter = CoreClrFolderHolder.End();
+ BOOL findSep = CoreClrFolderHolder.FindBack(iter, DIRECTORY_SEPARATOR_CHAR_W);
+ if (findSep)
{
- hr = S_OK;
+ SString sJitName(pwzJitName);
+ CoreClrFolderHolder.Replace(iter + 1, CoreClrFolderHolder.End() - (iter + 1), sJitName);
+
+ *phJit = CLRLoadLibrary(CoreClrFolderHolder.GetUnicode());
+ if (*phJit != NULL)
+ {
+ hr = S_OK;
+ }
}
}
}
-
+ else
+ {
+ LOG((LF_JIT, LL_FATALERROR, "LoadAndInitializeJIT: invalid characters in %S\n", pwzJitName));
+ }
if (SUCCEEDED(hr))
{
@@ -4367,7 +4406,17 @@ LPCWSTR ExecutionManager::GetJitName()
{
STANDARD_VM_CONTRACT;
- return MAKEDLLNAME_W(W("clrjit"));
+ LPCWSTR pwzJitName = NULL;
+
+ // Try to obtain a name for the jit library from the env. variable
+ IfFailThrow(CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_JitName, const_cast(&pwzJitName)));
+
+ if (NULL == pwzJitName)
+ {
+ pwzJitName = MAKEDLLNAME_W(W("clrjit"));
+ }
+
+ return pwzJitName;
}
#endif // !FEATURE_MERGE_JIT_AND_ENGINE
diff --git a/src/coreclr/src/vm/corelib.h b/src/coreclr/src/vm/corelib.h
index dbf514748420a..fd22fe782981f 100644
--- a/src/coreclr/src/vm/corelib.h
+++ b/src/coreclr/src/vm/corelib.h
@@ -371,6 +371,9 @@ DEFINE_CLASS(RT_TYPE_HANDLE, System, RuntimeTypeHandle)
DEFINE_METHOD(RT_TYPE_HANDLE, GET_TYPE_HELPER, GetTypeHelper, SM_Type_ArrType_IntPtr_int_RetType)
DEFINE_METHOD(RT_TYPE_HANDLE, PVOID_CTOR, .ctor, IM_RuntimeType_RetVoid)
DEFINE_METHOD(RT_TYPE_HANDLE, GETVALUEINTERNAL, GetValueInternal, SM_RuntimeTypeHandle_RetIntPtr)
+#ifdef FEATURE_COMINTEROP
+DEFINE_METHOD(RT_TYPE_HANDLE, ALLOCATECOMOBJECT, AllocateComObject, SM_VoidPtr_RetObj)
+#endif
DEFINE_FIELD(RT_TYPE_HANDLE, M_TYPE, m_type)
DEFINE_CLASS_U(Reflection, RtFieldInfo, NoClass)
diff --git a/src/coreclr/src/vm/customattribute.cpp b/src/coreclr/src/vm/customattribute.cpp
index 3dea5604587b9..e0fd928721192 100644
--- a/src/coreclr/src/vm/customattribute.cpp
+++ b/src/coreclr/src/vm/customattribute.cpp
@@ -908,7 +908,6 @@ FCIMPL7(void, COMCustomAttribute::GetPropertyOrFieldData, ReflectModuleBaseObjec
nullTH = th;
}
- //
// get the string representing the field/property name
*pName = ArgSlotToString(GetDataFromBlob(
pCtorAssembly, SERIALIZATION_TYPE_STRING, nullTH, &pBlob, pBlobEnd, pModule, &bObjectCreated));
@@ -937,6 +936,7 @@ FCIMPL7(void, COMCustomAttribute::GetPropertyOrFieldData, ReflectModuleBaseObjec
break;
case SERIALIZATION_TYPE_SZARRAY:
{
+ *value = NULL;
int arraySize = (int)GetDataFromBlob(pCtorAssembly, SERIALIZATION_TYPE_I4, nullTH, &pBlob, pBlobEnd, pModule, &bObjectCreated);
if (arraySize != -1)
diff --git a/src/coreclr/src/vm/ecalllist.h b/src/coreclr/src/vm/ecalllist.h
index 87389732f8d2e..00cb622a7046d 100644
--- a/src/coreclr/src/vm/ecalllist.h
+++ b/src/coreclr/src/vm/ecalllist.h
@@ -189,8 +189,7 @@ FCFuncStart(gSystem_RuntimeType)
FCFuncEnd()
FCFuncStart(gCOMTypeHandleFuncs)
- FCFuncElement("CreateInstance", RuntimeTypeHandle::CreateInstance)
- FCFuncElement("CreateInstanceForAnotherGenericParameter", RuntimeTypeHandle::CreateInstanceForGenericType)
+ QCFuncElement("CreateInstanceForAnotherGenericParameter", RuntimeTypeHandle::CreateInstanceForAnotherGenericParameter)
QCFuncElement("GetGCHandle", RuntimeTypeHandle::GetGCHandle)
QCFuncElement("FreeGCHandle", RuntimeTypeHandle::FreeGCHandle)
@@ -239,7 +238,10 @@ FCFuncStart(gCOMTypeHandleFuncs)
FCFuncElement("IsGenericTypeDefinition", RuntimeTypeHandle::IsGenericTypeDefinition)
FCFuncElement("ContainsGenericVariables", RuntimeTypeHandle::ContainsGenericVariables)
FCFuncElement("SatisfiesConstraints", RuntimeTypeHandle::SatisfiesConstraints)
- FCFuncElement("Allocate", RuntimeTypeHandle::Allocate) //for A.CI
+ QCFuncElement("GetActivationInfo", RuntimeTypeHandle::GetActivationInfo)
+#ifdef FEATURE_COMINTEROP
+ FCFuncElement("AllocateComObject", RuntimeTypeHandle::AllocateComObject)
+#endif // FEATURE_COMINTEROP
FCFuncElement("CompareCanonicalHandles", RuntimeTypeHandle::CompareCanonicalHandles)
FCIntrinsic("GetValueInternal", RuntimeTypeHandle::GetValueInternal, CORINFO_INTRINSIC_RTH_GetValueInternal)
FCFuncElement("IsEquivalentTo", RuntimeTypeHandle::IsEquivalentTo)
@@ -1050,8 +1052,8 @@ FCFuncStart(gPalKernel32Funcs)
QCFuncElement("CreateMutexEx", CreateMutexExW)
QCFuncElement("CreateSemaphoreEx", CreateSemaphoreExW)
QCFuncElement("FormatMessage", FormatMessageW)
- QCFuncElement("FreeEnvironmentStrings", FreeEnvironmentStringsW)
- QCFuncElement("GetEnvironmentStrings", GetEnvironmentStringsW)
+ QCFuncElement("FreeEnvironmentStringsW", FreeEnvironmentStringsW)
+ QCFuncElement("GetEnvironmentStringsW", GetEnvironmentStringsW)
QCFuncElement("GetEnvironmentVariable", GetEnvironmentVariableW)
QCFuncElement("OpenEvent", OpenEventW)
QCFuncElement("OpenMutex", OpenMutexW)
diff --git a/src/coreclr/src/vm/jithelpers.cpp b/src/coreclr/src/vm/jithelpers.cpp
index c101e43575a72..0ef036d815d8a 100644
--- a/src/coreclr/src/vm/jithelpers.cpp
+++ b/src/coreclr/src/vm/jithelpers.cpp
@@ -55,6 +55,7 @@
#include "runtimehandles.h"
#include "castcache.h"
#include "onstackreplacement.h"
+#include "pgo.h"
//========================================================================
//
@@ -5233,6 +5234,75 @@ void JIT_Patchpoint(int* counter, int ilOffset)
#endif // FEATURE_ON_STACK_REPLACEMENT
+HCIMPL2(void, JIT_ClassProfile, Object *obj, void* tableAddress)
+{
+ FCALL_CONTRACT;
+ FC_GC_POLL_NOT_NEEDED();
+
+ OBJECTREF objRef = ObjectToOBJECTREF(obj);
+ VALIDATEOBJECTREF(objRef);
+
+ ICorJitInfo::ClassProfile* const classProfile = (ICorJitInfo::ClassProfile*) tableAddress;
+ volatile unsigned* pCount = (volatile unsigned*) &classProfile->Count;
+ const unsigned count = *pCount++;
+ const unsigned S = ICorJitInfo::ClassProfile::SIZE;
+ const unsigned N = ICorJitInfo::ClassProfile::SAMPLE_INTERVAL;
+ _ASSERTE(N >= S);
+
+ if (objRef == NULL)
+ {
+ return;
+ }
+
+ CORINFO_CLASS_HANDLE clsHnd = (CORINFO_CLASS_HANDLE)objRef->GetMethodTable();
+
+#ifdef _DEBUG
+ PgoManager::VerifyAddress(classProfile);
+ PgoManager::VerifyAddress(classProfile + 1);
+#endif
+
+ // If table is not yet full, just add entries in.
+ //
+ if (count < S)
+ {
+ classProfile->ClassTable[count] = clsHnd;
+ }
+ else
+ {
+ // generate a random number (xorshift32)
+ //
+ // intentionally simple so we can have multithreaded
+ // access w/o tearing state.
+ //
+ static volatile unsigned s_rng = 100;
+
+ unsigned x = s_rng;
+ x ^= x << 13;
+ x ^= x >> 17;
+ x ^= x << 5;
+ s_rng = x;
+
+ // N is the sampling window size,
+ // it should be larger than the table size.
+ //
+ // If we let N == count then we are building an entire
+ // run sample -- probability of update decreases over time.
+ // Would be a good strategy for an AOT profiler.
+ //
+ // But for TieredPGO we would prefer something that is more
+ // weighted to recent observations.
+ //
+ // For S=4, N=128, we'll sample (on average) every 32nd call.
+ //
+ if ((x % N) < S)
+ {
+ unsigned i = x % S;
+ classProfile->ClassTable[i] = clsHnd;
+ }
+ }
+}
+HCIMPLEND
+
//========================================================================
//
// INTEROP HELPERS
diff --git a/src/coreclr/src/vm/jitinterface.cpp b/src/coreclr/src/vm/jitinterface.cpp
index 3824a1f87773d..6515a798ba588 100644
--- a/src/coreclr/src/vm/jitinterface.cpp
+++ b/src/coreclr/src/vm/jitinterface.cpp
@@ -11924,6 +11924,54 @@ HRESULT CEEJitInfo::getMethodBlockCounts (
return hr;
}
+CORINFO_CLASS_HANDLE CEEJitInfo::getLikelyClass(
+ CORINFO_METHOD_HANDLE ftnHnd,
+ CORINFO_CLASS_HANDLE baseHnd,
+ UINT32 ilOffset,
+ UINT32 * pLikelihood,
+ UINT32 * pNumberOfClasses
+)
+{
+ CONTRACTL {
+ THROWS;
+ GC_TRIGGERS;
+ MODE_PREEMPTIVE;
+ } CONTRACTL_END;
+
+ CORINFO_CLASS_HANDLE result = NULL;
+ *pLikelihood = 0;
+ *pNumberOfClasses = 0;
+
+ JIT_TO_EE_TRANSITION();
+
+#ifdef FEATURE_PGO
+
+ // Query the PGO manager's per call site class profile.
+ //
+ MethodDesc* pMD = (MethodDesc*)ftnHnd;
+ unsigned codeSize = 0;
+ if (pMD->IsDynamicMethod())
+ {
+ unsigned stackSize, ehSize;
+ CorInfoOptions options;
+ DynamicResolver * pResolver = m_pMethodBeingCompiled->AsDynamicMethodDesc()->GetResolver();
+ pResolver->GetCodeInfo(&codeSize, &stackSize, &options, &ehSize);
+ }
+ else if (pMD->HasILHeader())
+ {
+ COR_ILMETHOD_DECODER decoder(pMD->GetILHeader());
+ codeSize = decoder.GetCodeSize();
+ }
+
+ result = PgoManager::getLikelyClass(pMD, codeSize, ilOffset, pLikelihood, pNumberOfClasses);
+
+#endif
+
+ EE_TO_JIT_TRANSITION();
+
+ return result;
+}
+
void CEEJitInfo::allocMem (
ULONG hotCodeSize, /* IN */
ULONG coldCodeSize, /* IN */
@@ -12660,7 +12708,13 @@ CORJIT_FLAGS GetCompileFlags(MethodDesc * ftn, CORJIT_FLAGS flags, CORINFO_METHO
#ifdef FEATURE_PGO
- if (CLRConfig::GetConfigValue(CLRConfig::INTERNAL_WritePGOData) > 0)
+ // Instrument, if
+ //
+ // * We're writing pgo data and we're jitting at Tier0.
+ // * Tiered PGO is enabled and we're jitting at Tier0.
+ //
+ if ((CLRConfig::GetConfigValue(CLRConfig::INTERNAL_WritePGOData) > 0)
+ && flags.IsSet(CORJIT_FLAGS::CORJIT_FLAG_TIER0))
{
flags.Set(CORJIT_FLAGS::CORJIT_FLAG_BBINSTR);
}
@@ -14159,6 +14213,17 @@ HRESULT CEEInfo::getMethodBlockCounts(
UNREACHABLE_RET(); // only called on derived class.
}
+CORINFO_CLASS_HANDLE CEEInfo::getLikelyClass(
+ CORINFO_METHOD_HANDLE ftnHnd,
+ CORINFO_CLASS_HANDLE baseHnd,
+ UINT32 ilOffset,
+ UINT32* pLikelihood,
+ UINT32* pNumberOfCases
+)
+{
+ LIMITED_METHOD_CONTRACT;
+ UNREACHABLE_RET(); // only called on derived class.
+}
void CEEInfo::recordCallSite(
ULONG instrOffset, /* IN */
diff --git a/src/coreclr/src/vm/jitinterface.h b/src/coreclr/src/vm/jitinterface.h
index ccdafd03e8726..7518004464e7d 100644
--- a/src/coreclr/src/vm/jitinterface.h
+++ b/src/coreclr/src/vm/jitinterface.h
@@ -1045,6 +1045,14 @@ class CEEInfo : public ICorJitInfo
UINT32 * pNumRuns
);
+ CORINFO_CLASS_HANDLE getLikelyClass(
+ CORINFO_METHOD_HANDLE ftnHnd,
+ CORINFO_CLASS_HANDLE baseHnd,
+ UINT32 ilOffset,
+ UINT32 * pLikelihood,
+ UINT32 * pNumberOfClasses
+ );
+
void recordCallSite(
ULONG instrOffset, /* IN */
CORINFO_SIG_INFO * callSig, /* IN */
@@ -1247,6 +1255,14 @@ class CEEJitInfo : public CEEInfo
UINT32 * pNumRuns
);
+ CORINFO_CLASS_HANDLE getLikelyClass(
+ CORINFO_METHOD_HANDLE ftnHnd,
+ CORINFO_CLASS_HANDLE baseHnd,
+ UINT32 ilOffset,
+ UINT32 * pLikelihood,
+ UINT32 * pNumberOfClasses
+ );
+
void recordCallSite(
ULONG instrOffset, /* IN */
CORINFO_SIG_INFO * callSig, /* IN */
diff --git a/src/coreclr/src/vm/metasig.h b/src/coreclr/src/vm/metasig.h
index 0714e0c50e209..c9856714883b8 100644
--- a/src/coreclr/src/vm/metasig.h
+++ b/src/coreclr/src/vm/metasig.h
@@ -464,6 +464,7 @@ DEFINE_METASIG(IM(RefObject_RetBool, r(j), F))
DEFINE_METASIG_T(IM(Class_RetObj, C(CLASS), j))
DEFINE_METASIG(IM(Int_VoidPtr_RetVoid, i P(v), v))
DEFINE_METASIG(IM(VoidPtr_RetVoid, P(v), v))
+DEFINE_METASIG(SM(VoidPtr_RetObj, P(v), j))
DEFINE_METASIG_T(IM(Str_RetModule, s, C(MODULE)))
DEFINE_METASIG_T(SM(Assembly_Str_RetAssembly, C(ASSEMBLY) s, C(ASSEMBLY)))
diff --git a/src/coreclr/src/vm/methodtable.cpp b/src/coreclr/src/vm/methodtable.cpp
index 845c655cef9df..d0d0e2f9d5cf9 100644
--- a/src/coreclr/src/vm/methodtable.cpp
+++ b/src/coreclr/src/vm/methodtable.cpp
@@ -9150,7 +9150,7 @@ BOOL MethodTable::HasExplicitOrImplicitPublicDefaultConstructor()
}
//==========================================================================================
-MethodDesc *MethodTable::GetDefaultConstructor()
+MethodDesc *MethodTable::GetDefaultConstructor(BOOL forceBoxedEntryPoint /* = FALSE */)
{
WRAPPER_NO_CONTRACT;
_ASSERTE(HasDefaultConstructor());
@@ -9161,7 +9161,7 @@ MethodDesc *MethodTable::GetDefaultConstructor()
// returns pCanonMD immediately.
return MethodDesc::FindOrCreateAssociatedMethodDesc(pCanonMD,
this,
- FALSE /* no BoxedEntryPointStub */,
+ forceBoxedEntryPoint,
Instantiation(), /* no method instantiation */
FALSE /* no allowInstParam */);
}
diff --git a/src/coreclr/src/vm/methodtable.h b/src/coreclr/src/vm/methodtable.h
index 850a13d388935..4f05c6a1868c2 100644
--- a/src/coreclr/src/vm/methodtable.h
+++ b/src/coreclr/src/vm/methodtable.h
@@ -823,7 +823,7 @@ class MethodTable
BOOL HasDefaultConstructor();
void SetHasDefaultConstructor();
WORD GetDefaultConstructorSlot();
- MethodDesc *GetDefaultConstructor();
+ MethodDesc *GetDefaultConstructor(BOOL forceBoxedEntryPoint = FALSE);
BOOL HasExplicitOrImplicitPublicDefaultConstructor();
diff --git a/src/coreclr/src/vm/pgo.cpp b/src/coreclr/src/vm/pgo.cpp
index 16d57f29d8cc8..3b7ab178984ef 100644
--- a/src/coreclr/src/vm/pgo.cpp
+++ b/src/coreclr/src/vm/pgo.cpp
@@ -8,11 +8,82 @@
#ifdef FEATURE_PGO
ICorJitInfo::BlockCounts* PgoManager::s_PgoData;
-unsigned PgoManager::s_PgoIndex;
+unsigned volatile PgoManager::s_PgoIndex;
const char* const PgoManager::s_FileHeaderString = "*** START PGO Data, max index = %u ***\n";
const char* const PgoManager::s_FileTrailerString = "*** END PGO Data ***\n";
const char* const PgoManager::s_MethodHeaderString = "@@@ token 0x%08X hash 0x%08X ilSize 0x%08X records 0x%08X index %u\n";
const char* const PgoManager::s_RecordString = "ilOffs %u count %u\n";
+const char* const PgoManager::s_ClassProfileHeader = "classProfile iloffs %u samples %u entries %u totalCount %u %s\n";
+const char* const PgoManager::s_ClassProfileEntry = "class %p (%s) count %u\n";
+
+// Data item in class profile histogram
+//
+struct HistogramEntry
+{
+ // Class that was observed at runtime
+ CORINFO_CLASS_HANDLE m_mt;
+ // Number of observations in the table
+ unsigned m_count;
+};
+
+// Summarizes a ClassProfile table by forming a Histogram
+//
+struct Histogram
+{
+ Histogram(const ICorJitInfo::ClassProfile* classProfile);
+
+ // Number of nonzero entries in the histogram
+ unsigned m_count;
+ // Sum of counts from all entries in the histogram
+ unsigned m_totalCount;
+ // Histogram entries, in no particular order.
+ // The first m_count of these will be valid.
+ HistogramEntry m_histogram[ICorJitInfo::ClassProfile::SIZE];
+};
+
+Histogram::Histogram(const ICorJitInfo::ClassProfile* classProfile)
+{
+ m_count = 0;
+ m_totalCount = 0;
+
+ for (unsigned k = 0; k < ICorJitInfo::ClassProfile::SIZE; k++)
+ {
+ CORINFO_CLASS_HANDLE currentEntry = classProfile->ClassTable[k];
+
+ if (currentEntry == NULL)
+ {
+ continue;
+ }
+
+ m_totalCount++;
+
+ bool found = false;
+ unsigned h = 0;
+ for(; h < m_count; h++)
+ {
+ if (m_histogram[h].m_mt == currentEntry)
+ {
+ m_histogram[h].m_count++;
+ found = true;
+ break;
+ }
+ }
+
+ if (!found)
+ {
+ m_histogram[h].m_mt = currentEntry;
+ m_histogram[h].m_count = 1;
+ m_count++;
+ }
+ }
+
+ // Zero the remainder
+ for (unsigned k = m_count; k < ICorJitInfo::ClassProfile::SIZE; k++)
+ {
+ m_histogram[k].m_mt = 0;
+ m_histogram[k].m_count = 0;
+ }
+}
void PgoManager::Initialize()
{
@@ -36,6 +107,12 @@ void PgoManager::Shutdown()
WritePgoData();
}
+void PgoManager::VerifyAddress(void* address)
+{
+ _ASSERTE(address > s_PgoData);
+ _ASSERTE(address <= s_PgoData + BUFFER_SIZE);
+}
+
void PgoManager::WritePgoData()
{
if (CLRConfig::GetConfigValue(CLRConfig::INTERNAL_WritePGOData) == 0)
@@ -47,7 +124,6 @@ void PgoManager::WritePgoData()
{
return;
}
-
CLRConfigStringHolder fileName(CLRConfig::GetConfigValue(CLRConfig::INTERNAL_PGODataPath));
if (fileName == NULL)
@@ -80,15 +156,79 @@ void PgoManager::WritePgoData()
index += 2;
- ICorJitInfo::BlockCounts* records = &s_PgoData[index];
- unsigned recordCount = header->recordCount - 2;
- unsigned lastOffset = 0;
- for (unsigned i = 0; i < recordCount; i++)
+ ICorJitInfo::BlockCounts* records = &s_PgoData[index];
+ unsigned recordCount = header->recordCount - 2;
+ unsigned lastOffset = 0;
+ bool hasClassProfile = false;
+ unsigned i = 0;
+
+ while (i < recordCount)
{
const unsigned thisOffset = records[i].ILOffset;
- assert((thisOffset > lastOffset) || (lastOffset == 0));
+
+
+ if ((thisOffset & ICorJitInfo::ClassProfile::CLASS_FLAG) != 0)
+ {
+ // remainder must be class probe data
+ hasClassProfile = true;
+ break;
+ }
+
lastOffset = thisOffset;
fprintf(pgoDataFile, s_RecordString, records[i].ILOffset, records[i].ExecutionCount);
+ i++;
+ }
+
+ if (hasClassProfile)
+ {
+ fflush(pgoDataFile);
+
+ // Write out histogram of each probe's data.
+ // We currently don't expect to be able to read this back in.
+ //
+ while (i < recordCount)
+ {
+ // Should be enough room left for a class profile.
+ _ASSERTE(i + sizeof(ICorJitInfo::ClassProfile) / sizeof(ICorJitInfo::BlockCounts) <= recordCount);
+
+ const ICorJitInfo::ClassProfile* classProfile = (ICorJitInfo::ClassProfile*)&s_PgoData[i + index];
+
+ // Form a histogram...
+ //
+ Histogram h(classProfile);
+
+ // And display...
+ //
+ // Figure out if this is a virtual or interface probe.
+ //
+ const char* profileType = "virtual";
+
+ if ((classProfile->ILOffset & ICorJitInfo::ClassProfile::INTERFACE_FLAG) != 0)
+ {
+ profileType = "interface";
+ }
+
+ // "classProfile iloffs %u samples %u entries %u totalCount %u %s\n";
+ //
+ fprintf(pgoDataFile, s_ClassProfileHeader, (classProfile->ILOffset & ICorJitInfo::ClassProfile::OFFSET_MASK),
+ classProfile->Count, h.m_count, h.m_totalCount, profileType);
+
+ for (unsigned j = 0; j < h.m_count; j++)
+ {
+ CORINFO_CLASS_HANDLE clsHnd = h.m_histogram[j].m_mt;
+ const char* className = "n/a";
+#ifdef _DEBUG
+ TypeHandle typeHnd(clsHnd);
+ MethodTable* pMT = typeHnd.AsMethodTable();
+ className = pMT->GetDebugClassName();
+#endif
+ fprintf(pgoDataFile, s_ClassProfileEntry, clsHnd, className, h.m_histogram[j].m_count);
+ }
+
+ // Advance to next entry.
+ //
+ i += sizeof(ICorJitInfo::ClassProfile) / sizeof(ICorJitInfo::BlockCounts);
+ }
}
index += recordCount;
@@ -179,7 +319,7 @@ void PgoManager::ReadPgoData()
continue;
}
- assert(index == rIndex);
+ _ASSERTE(index == rIndex);
methods++;
// If there's not enough room left, bail
@@ -218,8 +358,13 @@ void PgoManager::ReadPgoData()
if (sscanf_s(buffer, s_RecordString, &s_PgoData[index].ILOffset, &s_PgoData[index].ExecutionCount) != 2)
{
- failed = true;
- break;
+ // This might be class profile data; if so just skip it.
+ //
+ if (strstr(buffer, "class") != buffer)
+ {
+ failed = true;
+ break;
+ }
}
index++;
@@ -342,6 +487,172 @@ HRESULT PgoManager::getMethodBlockCounts(MethodDesc* pMD, unsigned ilSize, UINT3
return E_NOTIMPL;
}
+// See if there is a class profile for this method at the indicated il Offset.
+// If so, return the most frequently seen class, along with the likelihood that
+// it was the class seen, and the total number of classes seen.
+//
+// Return NULL if there is no profile data to be found.
+//
+CORINFO_CLASS_HANDLE PgoManager::getLikelyClass(MethodDesc* pMD, unsigned ilSize, unsigned ilOffset, UINT32* pLikelihood, UINT32* pNumberOfClasses)
+{
+ *pLikelihood = 0;
+ *pNumberOfClasses = 0;
+
+ // Bail if there's no profile data.
+ //
+ if (s_PgoData == NULL)
+ {
+ return NULL;
+ }
+
+ // See if we can find profile data for this method in the profile buffer.
+ //
+ const unsigned maxIndex = s_PgoIndex;
+ const unsigned token = pMD->IsDynamicMethod() ? 0 : pMD->GetMemberDef();
+ const unsigned hash = pMD->GetStableHash();
+
+ unsigned index = 0;
+ unsigned methodsChecked = 0;
+
+ while (index < maxIndex)
+ {
+ // The first two "records" of each entry are actually header data
+ // to identify the method.
+ //
+ Header* const header = (Header*)&s_PgoData[index];
+
+ // Sanity check that header data looks reasonable. If not, just
+ // fail the lookup.
+ //
+ if ((header->recordCount < MIN_RECORD_COUNT) || (header->recordCount > MAX_RECORD_COUNT))
+ {
+ break;
+ }
+
+ // See if the header info matches the current method.
+ //
+ if ((header->token == token) && (header->hash == hash) && (header->ilSize == ilSize))
+ {
+ // Yep, found data. See if there is a suitable class profile.
+ //
+ // This bit is currently somewhat hacky ... we scan the records, the count records come
+ // first and are in increasing IL offset order. Class profiles have inverted IL offsets
+ // so when we find an offset with high bit set, it's going to be an class profile.
+ //
+ unsigned countILOffset = 0;
+ unsigned j = 2;
+
+ // Skip past all the count entries
+ //
+ while (j < header->recordCount)
+ {
+ if ((s_PgoData[index + j].ILOffset & ICorJitInfo::ClassProfile::CLASS_FLAG) != 0)
+ {
+ break;
+ }
+
+ countILOffset = s_PgoData[index + j].ILOffset;
+ j++;
+ }
+
+ // Now we're in the "class profile" portion of the slab for this method.
+ // Look for the one that has the right IL offset.
+ //
+ while (j < header->recordCount)
+ {
+ const ICorJitInfo::ClassProfile* const classProfile = (ICorJitInfo::ClassProfile*)&s_PgoData[index + j];
+
+ if ((classProfile->ILOffset & ICorJitInfo::ClassProfile::OFFSET_MASK) != ilOffset)
+ {
+ // Need to make sure this is even divisor
+ //
+ j += sizeof(ICorJitInfo::ClassProfile) / sizeof(ICorJitInfo::BlockCounts);
+ continue;
+ }
+
+ // Form a histogram
+ //
+ Histogram h(classProfile);
+
+ // Use histogram count as number of classes estimate
+ //
+ *pNumberOfClasses = h.m_count;
+
+ // Report back what we've learned
+ // (perhaps, use count to augment likelihood?)
+ //
+ switch (h.m_count)
+ {
+ case 0:
+ {
+ return NULL;
+ }
+ break;
+
+ case 1:
+ {
+ *pLikelihood = 100;
+ return h.m_histogram[0].m_mt;
+ }
+ break;
+
+ case 2:
+ {
+ if (h.m_histogram[0].m_count >= h.m_histogram[1].m_count)
+ {
+ *pLikelihood = (100 * h.m_histogram[0].m_count) / h.m_totalCount;
+ return h.m_histogram[0].m_mt;
+ }
+ else
+ {
+ *pLikelihood = (100 * h.m_histogram[1].m_count) / h.m_totalCount;
+ return h.m_histogram[1].m_mt;
+ }
+ }
+ break;
+
+ default:
+ {
+ // Find maximum entry and return it
+ //
+ unsigned maxIndex = 0;
+ unsigned maxCount = 0;
+
+ for (unsigned m = 0; m < h.m_count; m++)
+ {
+ if (h.m_histogram[m].m_count > maxCount)
+ {
+ maxIndex = m;
+ maxCount = h.m_histogram[m].m_count;
+ }
+ }
+
+ if (maxCount > 0)
+ {
+ *pLikelihood = (100 * maxCount) / h.m_totalCount;
+ return h.m_histogram[maxIndex].m_mt;
+ }
+
+ return NULL;
+ }
+ break;
+ }
+ }
+
+ // Failed to find a class profile entry
+ //
+ return NULL;
+ }
+
+ index += header->recordCount;
+ methodsChecked++;
+ }
+
+ // Failed to find any sort of profile data for this method
+ //
+ return NULL;
+}
+
#else
// Stub version for !FEATURE_PGO builds
@@ -364,4 +675,11 @@ HRESULT PgoManager::getMethodBlockCounts(MethodDesc* pMD, unsigned ilSize, UINT3
return E_NOTIMPL;
}
+// Stub version for !FEATURE_PGO builds
+//
+CORINFO_CLASS_HANDLE PgoManager::getLikelyClass(MethodDesc* pMD, unsigned ilSize, unsigned ilOffset)
+{
+ return NULL;
+}
+
#endif // FEATURE_PGO
diff --git a/src/coreclr/src/vm/pgo.h b/src/coreclr/src/vm/pgo.h
index c5fc5273236f1..3ba4ab6ddb871 100644
--- a/src/coreclr/src/vm/pgo.h
+++ b/src/coreclr/src/vm/pgo.h
@@ -22,18 +22,26 @@ class PgoManager
static HRESULT allocMethodBlockCounts(MethodDesc* pMD, UINT32 count,
ICorJitInfo::BlockCounts** pBlockCounts, unsigned ilSize);
- // Retreive the profile block count buffer for a method
+ // Retrieve the profile block count buffer for a method
static HRESULT getMethodBlockCounts(MethodDesc* pMD, unsigned ilSize, UINT32* pCount,
ICorJitInfo::BlockCounts** pBlockCounts, UINT32* pNumRuns);
+ // Retrieve the most likely class for a particular call
+ static CORINFO_CLASS_HANDLE getLikelyClass(MethodDesc* pMD, unsigned ilSize, unsigned ilOffset, UINT32* pLikelihood, UINT32* pNumberOfClasses);
+
+ // Verify address in bounds
+ static void VerifyAddress(void* address);
+
#ifdef FEATURE_PGO
private:
enum
{
- // Number of ICorJitInfo::BlockCount records in the global slab
- BUFFER_SIZE = 64 * 1024,
+ // Number of ICorJitInfo::BlockCount records in the global slab.
+ // Currently 4MB for a 64 bit system.
+ //
+ BUFFER_SIZE = 8 * 64 * 1024,
MIN_RECORD_COUNT = 3,
MAX_RECORD_COUNT = BUFFER_SIZE
};
@@ -57,13 +65,15 @@ class PgoManager
static ICorJitInfo::BlockCounts* s_PgoData;
// Index of next free entry in the global slab
- static unsigned s_PgoIndex;
+ static unsigned volatile s_PgoIndex;
// Formatting strings for file input/output
static const char* const s_FileHeaderString;
static const char* const s_FileTrailerString;
static const char* const s_MethodHeaderString;
static const char* const s_RecordString;
+ static const char* const s_ClassProfileHeader;
+ static const char* const s_ClassProfileEntry;
#endif // FEATURE_PGO
};
diff --git a/src/coreclr/src/vm/reflectioninvocation.cpp b/src/coreclr/src/vm/reflectioninvocation.cpp
index e8bc4beb61218..cef2ecb6d96c3 100644
--- a/src/coreclr/src/vm/reflectioninvocation.cpp
+++ b/src/coreclr/src/vm/reflectioninvocation.cpp
@@ -338,207 +338,28 @@ FCIMPL7(void, RuntimeFieldHandle::SetValue, ReflectFieldObject *pFieldUNSAFE, Ob
}
FCIMPLEND
-//A.CI work
-FCIMPL1(Object*, RuntimeTypeHandle::Allocate, ReflectClassBaseObject* pTypeUNSAFE)
+void QCALLTYPE RuntimeTypeHandle::CreateInstanceForAnotherGenericParameter(
+ QCall::TypeHandle pTypeHandle,
+ TypeHandle* pInstArray,
+ INT32 cInstArray,
+ QCall::ObjectHandleOnStack pInstantiatedObject
+)
{
- CONTRACTL {
- FCALL_CHECK;
- PRECONDITION(CheckPointer(pTypeUNSAFE));
- }
- CONTRACTL_END
-
- REFLECTCLASSBASEREF refType = (REFLECTCLASSBASEREF)ObjectToOBJECTREF(pTypeUNSAFE);
- TypeHandle type = refType->GetType();
-
- // Handle the nullable special case
- if (Nullable::IsNullableType(type)) {
- return OBJECTREFToObject(Nullable::BoxedNullableNull(type));
- }
-
- OBJECTREF rv = NULL;
- HELPER_METHOD_FRAME_BEGIN_RET_1(refType);
- rv = AllocateObject(type.GetMethodTable());
- HELPER_METHOD_FRAME_END();
- return OBJECTREFToObject(rv);
-
-}//Allocate
-FCIMPLEND
-
-FCIMPL6(Object*, RuntimeTypeHandle::CreateInstance, ReflectClassBaseObject* refThisUNSAFE,
- CLR_BOOL publicOnly,
- CLR_BOOL wrapExceptions,
- CLR_BOOL* pbCanBeCached,
- MethodDesc** pConstructor,
- CLR_BOOL* pbHasNoDefaultCtor) {
- CONTRACTL {
- FCALL_CHECK;
- PRECONDITION(CheckPointer(refThisUNSAFE));
- PRECONDITION(CheckPointer(pbCanBeCached));
- PRECONDITION(CheckPointer(pConstructor));
- PRECONDITION(CheckPointer(pbHasNoDefaultCtor));
- PRECONDITION(*pbCanBeCached == false);
- PRECONDITION(*pConstructor == NULL);
- PRECONDITION(*pbHasNoDefaultCtor == false);
+ CONTRACTL{
+ QCALL_CHECK;
+ PRECONDITION(!pTypeHandle.AsTypeHandle().IsNull());
+ PRECONDITION(cInstArray >= 0);
+ PRECONDITION(cInstArray == 0 || pInstArray != NULL);
}
CONTRACTL_END;
- if (refThisUNSAFE == NULL)
- FCThrow(kNullReferenceException);
-
- MethodDesc* pMeth;
-
- OBJECTREF rv = NULL;
- REFLECTCLASSBASEREF refThis = (REFLECTCLASSBASEREF)ObjectToOBJECTREF(refThisUNSAFE);
- TypeHandle thisTH = refThis->GetType();
-
- Assembly *pAssem = thisTH.GetAssembly();
-
- HELPER_METHOD_FRAME_BEGIN_RET_2(rv, refThis);
-
- MethodTable* pVMT;
-
- // Get the type information associated with refThis
- if (thisTH.IsNull() || thisTH.IsTypeDesc()) {
- *pbHasNoDefaultCtor = true;
- goto DoneCreateInstance;
- }
-
- pVMT = thisTH.AsMethodTable();
-
- pVMT->EnsureInstanceActive();
-
-#ifdef FEATURE_COMINTEROP
- // If this is __ComObject then create the underlying COM object.
- if (IsComObjectClass(refThis->GetType())) {
-#ifdef FEATURE_COMINTEROP_UNMANAGED_ACTIVATION
- SyncBlock* pSyncBlock = refThis->GetSyncBlock();
-
- void* pClassFactory = (void*)pSyncBlock->GetInteropInfo()->GetComClassFactory();
- if (!pClassFactory)
- COMPlusThrow(kInvalidComObjectException, IDS_EE_NO_BACKING_CLASS_FACTORY);
-
- // create an instance of the Com Object
- rv = ((ComClassFactory*)pClassFactory)->CreateInstance(NULL);
-
-#else // FEATURE_COMINTEROP_UNMANAGED_ACTIVATION
-
- COMPlusThrow(kInvalidComObjectException, IDS_EE_NO_BACKING_CLASS_FACTORY);
+ TypeHandle genericType = pTypeHandle.AsTypeHandle();
-#endif // FEATURE_COMINTEROP_UNMANAGED_ACTIVATION
- }
- else
-#endif // FEATURE_COMINTEROP
- {
- // if this is an abstract class then we will fail this
- if (pVMT->IsAbstract()) {
- if (pVMT->IsInterface())
- COMPlusThrow(kMissingMethodException,W("Acc_CreateInterface"));
- else
- COMPlusThrow(kMissingMethodException,W("Acc_CreateAbst"));
- }
- else if (pVMT->ContainsGenericVariables()) {
- COMPlusThrow(kArgumentException,W("Acc_CreateGeneric"));
- }
-
- if (pVMT->IsByRefLike())
- COMPlusThrow(kNotSupportedException, W("NotSupported_ByRefLike"));
-
- if (pVMT->IsSharedByGenericInstantiations())
- COMPlusThrow(kNotSupportedException, W("NotSupported_Type"));
-
- if (!pVMT->HasDefaultConstructor())
- {
- // We didn't find the parameterless constructor,
- // if this is a Value class we can simply allocate one and return it
-
- if (!pVMT->IsValueType()) {
- *pbHasNoDefaultCtor = true;
- goto DoneCreateInstance;
- }
-
- // Handle the nullable special case
- if (Nullable::IsNullableType(thisTH)) {
- rv = Nullable::BoxedNullableNull(thisTH);
- }
- else
- rv = pVMT->Allocate();
-
- *pbCanBeCached = true;
- }
- else // !pVMT->HasDefaultConstructor()
- {
- pMeth = pVMT->GetDefaultConstructor();
-
- // Validate the method can be called by this caller
- DWORD attr = pMeth->GetAttrs();
-
- if (!IsMdPublic(attr) && publicOnly) {
- *pbHasNoDefaultCtor = true;
- goto DoneCreateInstance;
- }
-
- // We've got the class, lets allocate it and call the constructor
- OBJECTREF o;
-
- o = AllocateObject(pVMT);
- GCPROTECT_BEGIN(o);
-
- MethodDescCallSite ctor(pMeth, &o);
-
- // Copy "this" pointer
- ARG_SLOT arg;
- if (pVMT->IsValueType())
- arg = PtrToArgSlot(o->UnBox());
- else
- arg = ObjToArgSlot(o);
-
- // Call the method
- TryCallMethod(&ctor, &arg, wrapExceptions);
-
- rv = o;
- GCPROTECT_END();
-
- // No need to set these if they cannot be cached. In particular, if the type is a value type with a custom
- // parameterless constructor, don't allow caching and have subsequent calls come back here to allocate an object and
- // call the constructor.
- if (!pVMT->IsValueType())
- {
- *pbCanBeCached = true;
- *pConstructor = pMeth;
- }
- }
- }
-DoneCreateInstance:
- ;
- HELPER_METHOD_FRAME_END();
- return OBJECTREFToObject(rv);
-}
-FCIMPLEND
-
-FCIMPL2(Object*, RuntimeTypeHandle::CreateInstanceForGenericType, ReflectClassBaseObject* pTypeUNSAFE, ReflectClassBaseObject* pParameterTypeUNSAFE) {
- FCALL_CONTRACT;
-
- struct _gc
- {
- OBJECTREF rv;
- REFLECTCLASSBASEREF refType;
- REFLECTCLASSBASEREF refParameterType;
- } gc;
-
- gc.rv = NULL;
- gc.refType = (REFLECTCLASSBASEREF)ObjectToOBJECTREF(pTypeUNSAFE);
- gc.refParameterType = (REFLECTCLASSBASEREF)ObjectToOBJECTREF(pParameterTypeUNSAFE);
-
- MethodDesc* pMeth;
- TypeHandle genericType = gc.refType->GetType();
-
- TypeHandle parameterHandle = gc.refParameterType->GetType();
+ BEGIN_QCALL;
_ASSERTE (genericType.HasInstantiation());
- HELPER_METHOD_FRAME_BEGIN_RET_PROTECT(gc);
-
- TypeHandle instantiatedType = ((TypeHandle)genericType.GetCanonicalMethodTable()).Instantiate(Instantiation(¶meterHandle, 1));
+ TypeHandle instantiatedType = ((TypeHandle)genericType.GetCanonicalMethodTable()).Instantiate(Instantiation(pInstArray, (DWORD)cInstArray));
// Get the type information associated with refThis
MethodTable* pVMT = instantiatedType.GetMethodTable();
@@ -546,24 +367,24 @@ FCIMPL2(Object*, RuntimeTypeHandle::CreateInstanceForGenericType, ReflectClassBa
_ASSERTE( !pVMT->IsAbstract() ||! instantiatedType.ContainsGenericVariables());
_ASSERTE(!pVMT->IsByRefLike() && pVMT->HasDefaultConstructor());
- pMeth = pVMT->GetDefaultConstructor();
- MethodDescCallSite ctor(pMeth);
-
// We've got the class, lets allocate it and call the constructor
// Nullables don't take this path, if they do we need special logic to make an instance
_ASSERTE(!Nullable::IsNullableType(instantiatedType));
- gc.rv = instantiatedType.GetMethodTable()->Allocate();
- ARG_SLOT arg = ObjToArgSlot(gc.rv);
+ {
+ GCX_COOP();
- // Call the method
- TryCallMethod(&ctor, &arg, true);
+ OBJECTREF newObj = instantiatedType.GetMethodTable()->Allocate();
+ GCPROTECT_BEGIN(newObj);
+ CallDefaultConstructor(newObj);
+ GCPROTECT_END();
- HELPER_METHOD_FRAME_END();
- return OBJECTREFToObject(gc.rv);
+ pInstantiatedObject.Set(newObj);
+ }
+
+ END_QCALL;
}
-FCIMPLEND
NOINLINE FC_BOOL_RET IsInstanceOfTypeHelper(OBJECTREF obj, REFLECTCLASSBASEREF refType)
{
@@ -2176,6 +1997,262 @@ lExit: ;
}
FCIMPLEND
+/*
+ * Given a TypeHandle, validates whether it's legal to construct a real
+ * instance of that type. Throws an exception if the instantiation would
+ * be illegal; e.g., type is void or a pointer or an open generic. This
+ * doesn't guarantee that a ctor will succeed, only that the VM is able
+ * to support an instance of this type on the heap.
+ * ==========
+ * The 'fForGetUninitializedInstance' parameter controls the type of
+ * exception that is thrown if a check fails.
+ */
+void RuntimeTypeHandle::ValidateTypeAbleToBeInstantiated(
+ TypeHandle typeHandle,
+ bool fGetUninitializedObject)
+{
+ CONTRACTL
+ {
+ THROWS;
+ GC_TRIGGERS;
+ MODE_ANY;
+ }
+ CONTRACTL_END;
+
+ // Don't allow void
+ if (typeHandle.GetSignatureCorElementType() == ELEMENT_TYPE_VOID)
+ {
+ COMPlusThrow(kArgumentException, W("NotSupported_Type"));
+ }
+
+ // Don't allow arrays, pointers, byrefs, or function pointers
+ if (typeHandle.IsTypeDesc() || typeHandle.IsArray())
+ {
+ COMPlusThrow(fGetUninitializedObject ? kArgumentException : kMissingMethodException, W("NotSupported_Type"));
+ }
+
+ MethodTable* pMT = typeHandle.AsMethodTable();
+ PREFIX_ASSUME(pMT != NULL);
+
+ // Don't allow creating instances of delegates
+ if (pMT->IsDelegate())
+ {
+ COMPlusThrow(kArgumentException, W("NotSupported_Type"));
+ }
+
+ // Don't allow string or string-like (variable length) types.
+ if (pMT->HasComponentSize())
+ {
+ COMPlusThrow(fGetUninitializedObject ? kArgumentException : kMissingMethodException, W("Argument_NoUninitializedStrings"));
+ }
+
+ // Don't allow abstract classes or interface types
+ if (pMT->IsAbstract())
+ {
+ RuntimeExceptionKind exKind = fGetUninitializedObject ? kMemberAccessException : kMissingMethodException;
+ if (pMT->IsInterface())
+ COMPlusThrow(exKind, W("Acc_CreateInterface"));
+ else
+ COMPlusThrow(exKind, W("Acc_CreateAbst"));
+ }
+
+ // Don't allow generic variables (e.g., the 'T' from List)
+ // or open generic types (List<>).
+ if (typeHandle.ContainsGenericVariables())
+ {
+ COMPlusThrow(kMemberAccessException, W("Acc_CreateGeneric"));
+ }
+
+ // Don't allow generics instantiated over __Canon
+ if (pMT->IsSharedByGenericInstantiations())
+ {
+ COMPlusThrow(kNotSupportedException, W("NotSupported_Type"));
+ }
+
+ // Don't allow ref structs
+ if (pMT->IsByRefLike())
+ {
+ COMPlusThrow(kNotSupportedException, W("NotSupported_ByRefLike"));
+ }
+}
+
+/*
+ * Given a RuntimeType, queries info on how to instantiate the object.
+ * pRuntimeType - [required] the RuntimeType object
+ * ppfnAllocator - [required, null-init] fnptr to the allocator
+ * mgd sig: void* -> object
+ * pvAllocatorFirstArg - [required, null-init] first argument to the allocator
+ * (normally, but not always, the MethodTable*)
+ * ppfnCtor - [required, null-init] the instance's parameterless ctor,
+ * mgd sig object -> void, or null if no ctor is needed for this type
+ * pfCtorIsPublic - [required, null-init] whether the parameterless ctor is public
+ * ==========
+ * This method will not run the type's static cctor.
+ * This method will not allocate an instance of the target type.
+ */
+void QCALLTYPE RuntimeTypeHandle::GetActivationInfo(
+ QCall::ObjectHandleOnStack pRuntimeType,
+ PCODE* ppfnAllocator,
+ void** pvAllocatorFirstArg,
+ PCODE* ppfnCtor,
+ BOOL* pfCtorIsPublic
+)
+{
+ CONTRACTL{
+ QCALL_CHECK;
+ PRECONDITION(CheckPointer(ppfnAllocator));
+ PRECONDITION(CheckPointer(pvAllocatorFirstArg));
+ PRECONDITION(CheckPointer(ppfnCtor));
+ PRECONDITION(CheckPointer(pfCtorIsPublic));
+ PRECONDITION(*ppfnAllocator == NULL);
+ PRECONDITION(*pvAllocatorFirstArg == NULL);
+ PRECONDITION(*ppfnCtor == NULL);
+ PRECONDITION(*pfCtorIsPublic == FALSE);
+ }
+ CONTRACTL_END;
+
+ TypeHandle typeHandle = NULL;
+
+ BEGIN_QCALL;
+
+ {
+ GCX_COOP();
+
+ // We need to take the RuntimeType itself rather than the RuntimeTypeHandle,
+ // as the COM CLSID is stored in the RuntimeType object's sync block, and we
+ // might need to pull it out later in this method.
+ typeHandle = ((REFLECTCLASSBASEREF)pRuntimeType.Get())->GetType();
+ }
+
+ ValidateTypeAbleToBeInstantiated(typeHandle, false /* fGetUninitializedObject */);
+
+ MethodTable* pMT = typeHandle.AsMethodTable();
+ PREFIX_ASSUME(pMT != NULL);
+
+#ifdef FEATURE_COMINTEROP
+ // COM allocation can involve the __ComObject base type (with attached CLSID) or a
+ // VM-implemented [ComImport] class. For CreateInstance, the flowchart is:
+ // - For __ComObject,
+ // .. on Windows, bypass normal newobj logic and use ComClassFactory::CreateInstance.
+ // .. on non-Windows, treat as a normal class, type has no special handling in VM.
+ // - For [ComImport] class, treat as a normal class. VM will replace default
+ // ctor with COM activation logic on supported platforms, else ctor itself will PNSE.
+ // IsComObjectClass is the correct way to check for __ComObject specifically
+ if (IsComObjectClass(typeHandle))
+ {
+ void* pClassFactory = NULL;
+
+#ifdef FEATURE_COMINTEROP_UNMANAGED_ACTIVATION
+ {
+ // Need to enter cooperative mode to manipulate OBJECTREFs
+ GCX_COOP();
+ SyncBlock* pSyncBlock = pRuntimeType.Get()->GetSyncBlock();
+ pClassFactory = (void*)pSyncBlock->GetInteropInfo()->GetComClassFactory();
+ }
+#endif // FEATURE_COMINTEROP_UNMANAGED_ACTIVATION
+
+ if (pClassFactory == NULL)
+ {
+ // no factory *or* unmanaged activation is not enabled in this runtime
+ COMPlusThrow(kInvalidComObjectException, IDS_EE_NO_BACKING_CLASS_FACTORY);
+ }
+
+ // managed sig: ComClassFactory* -> object (via FCALL)
+ *ppfnAllocator = CoreLibBinder::GetMethod(METHOD__RT_TYPE_HANDLE__ALLOCATECOMOBJECT)->GetMultiCallableAddrOfCode();
+ *pvAllocatorFirstArg = pClassFactory;
+ *ppfnCtor = NULL; // no ctor call needed; activation handled entirely by the allocator
+ *pfCtorIsPublic = TRUE; // no ctor call needed => assume 'public' equivalent
+ }
+ else
+#endif // FEATURE_COMINTEROP
+ if (pMT->IsNullable())
+ {
+ // CreateInstance returns null given Nullable
+ *ppfnAllocator = NULL;
+ *pvAllocatorFirstArg = NULL;
+ *ppfnCtor = NULL;
+ *pfCtorIsPublic = TRUE; // no ctor call needed => assume 'public' equivalent
+ }
+ else
+ {
+ // managed sig: MethodTable* -> object (via JIT helper)
+ *ppfnAllocator = CEEJitInfo::getHelperFtnStatic(CEEInfo::getNewHelperStatic(pMT));
+ *pvAllocatorFirstArg = pMT;
+
+ if (pMT->HasDefaultConstructor())
+ {
+ // managed sig: object -> void
+ // for ctors on value types, lookup boxed entry point stub
+ MethodDesc* pMD = pMT->GetDefaultConstructor(pMT->IsValueType() /* forceBoxedEntryPoint */);
+ _ASSERTE(pMD != NULL);
+
+ PCODE pCode = pMD->GetMultiCallableAddrOfCode();
+ _ASSERTE(pCode != NULL);
+
+ *ppfnCtor = pCode;
+ *pfCtorIsPublic = pMD->IsPublic();
+ }
+ else if (pMT->IsValueType())
+ {
+ *ppfnCtor = NULL; // no ctor call needed; we're creating a boxed default(T)
+ *pfCtorIsPublic = TRUE; // no ctor call needed => assume 'public' equivalent
+ }
+ else
+ {
+ // reference type with no parameterless ctor - we can't instantiate this
+ COMPlusThrow(kMissingMethodException, W("Arg_NoDefCTorWithoutTypeName"));
+ }
+ }
+
+ pMT->EnsureInstanceActive();
+
+ END_QCALL;
+}
+
+/*
+ * Given a ComClassFactory*, calls the COM allocator
+ * and returns a RCW.
+ */
+FCIMPL1(Object*, RuntimeTypeHandle::AllocateComObject,
+ void* pClassFactory)
+{
+ CONTRACTL{
+ FCALL_CHECK;
+ PRECONDITION(CheckPointer(pClassFactory));
+ }
+ CONTRACTL_END;
+
+ OBJECTREF rv = NULL;
+ bool allocated = false;
+
+ HELPER_METHOD_FRAME_BEGIN_RET_1(rv);
+
+#ifdef FEATURE_COMINTEROP
+#ifdef FEATURE_COMINTEROP_UNMANAGED_ACTIVATION
+ {
+ if (pClassFactory != NULL)
+ {
+ rv = ((ComClassFactory*)pClassFactory)->CreateInstance(NULL);
+ allocated = true;
+ }
+ }
+#endif // FEATURE_COMINTEROP_UNMANAGED_ACTIVATION
+#endif // FEATURE_COMINTEROP
+
+ if (!allocated)
+ {
+#ifdef FEATURE_COMINTEROP
+ COMPlusThrow(kInvalidComObjectException, IDS_EE_NO_BACKING_CLASS_FACTORY);
+#else // FEATURE_COMINTEROP
+ COMPlusThrow(kPlatformNotSupportedException, IDS_EE_NO_BACKING_CLASS_FACTORY);
+#endif // FEATURE_COMINTEROP
+ }
+
+ HELPER_METHOD_FRAME_END();
+ return OBJECTREFToObject(rv);
+}
+FCIMPLEND
+
//*************************************************************************************************
//*************************************************************************************************
//*************************************************************************************************
@@ -2193,36 +2270,9 @@ FCIMPL1(Object*, ReflectionSerialization::GetUninitializedObject, ReflectClassBa
TypeHandle type = objType->GetType();
- // Don't allow void, arrays, pointers, byrefs or function pointers.
- if (type.IsTypeDesc() || type.IsArray() || type.GetSignatureCorElementType() == ELEMENT_TYPE_VOID)
- COMPlusThrow(kArgumentException, W("Argument_InvalidValue"));
+ RuntimeTypeHandle::ValidateTypeAbleToBeInstantiated(type, true /* fForGetUninitializedInstance */);
- MethodTable *pMT = type.AsMethodTable();
- PREFIX_ASSUME(pMT != NULL);
-
- //We don't allow unitialized Strings or Utf8Strings.
- if (pMT == g_pStringClass) {
- COMPlusThrow(kArgumentException, W("Argument_NoUninitializedStrings"));
- }
-
- // if this is an abstract class or an interface type then we will
- // fail this
- if (pMT->IsAbstract()) {
- COMPlusThrow(kMemberAccessException,W("Acc_CreateAbst"));
- }
-
- if (pMT->ContainsGenericVariables()) {
- COMPlusThrow(kMemberAccessException,W("Acc_CreateGeneric"));
- }
-
- if (pMT->IsByRefLike()) {
- COMPlusThrow(kNotSupportedException, W("NotSupported_ByRefLike"));
- }
-
- // Never allow allocation of generics actually instantiated over __Canon
- if (pMT->IsSharedByGenericInstantiations()) {
- COMPlusThrow(kNotSupportedException, W("NotSupported_Type"));
- }
+ MethodTable* pMT = type.AsMethodTable();
// Never allow the allocation of an unitialized ContextBoundObject derived type, these must always be created with a paired
// transparent proxy or the jit will get confused.
@@ -2237,6 +2287,7 @@ FCIMPL1(Object*, ReflectionSerialization::GetUninitializedObject, ReflectClassBa
if (Nullable::IsNullableType(pMT))
pMT = pMT->GetInstantiation()[0].GetMethodTable();
+ // Allocation will invoke any precise static cctors as needed.
retVal = pMT->Allocate();
HELPER_METHOD_FRAME_END();
@@ -2583,4 +2634,3 @@ FCIMPL2(FC_BOOL_RET, ReflectionEnum::InternalHasFlag, Object *pRefThis, Object*
FC_RETURN_BOOL(cmp);
}
FCIMPLEND
-
diff --git a/src/coreclr/src/vm/runtimehandles.h b/src/coreclr/src/vm/runtimehandles.h
index 4063fd972237a..7675d1b3bcac9 100644
--- a/src/coreclr/src/vm/runtimehandles.h
+++ b/src/coreclr/src/vm/runtimehandles.h
@@ -122,13 +122,16 @@ class RuntimeTypeHandle {
public:
// Static method on RuntimeTypeHandle
- static FCDECL1(Object*, Allocate, ReflectClassBaseObject *refType) ; //A.CI work
- static FCDECL6(Object*, CreateInstance, ReflectClassBaseObject* refThisUNSAFE,
- CLR_BOOL publicOnly,
- CLR_BOOL wrapExceptions,
- CLR_BOOL *pbCanBeCached,
- MethodDesc** pConstructor,
- CLR_BOOL *pbHasNoDefaultCtor);
+
+ static
+ void QCALLTYPE GetActivationInfo(
+ QCall::ObjectHandleOnStack pRuntimeType,
+ PCODE* ppfnAllocator,
+ void** pvAllocatorFirstArg,
+ PCODE* ppfnCtor,
+ BOOL* pfCtorIsPublic);
+
+ static FCDECL1(Object*, AllocateComObject, void* pClassFactory);
static
void QCALLTYPE MakeByRef(QCall::TypeHandle pTypeHandle, QCall::ObjectHandleOnStack retType);
@@ -193,6 +196,7 @@ class RuntimeTypeHandle {
static FCDECL2(FC_BOOL_RET, IsInstanceOfType, ReflectClassBaseObject *pType, Object *object);
static FCDECL6(FC_BOOL_RET, SatisfiesConstraints, PTR_ReflectClassBaseObject pGenericParameter, TypeHandle *typeContextArgs, INT32 typeContextCount, TypeHandle *methodContextArgs, INT32 methodContextCount, PTR_ReflectClassBaseObject pGenericArgument);
+
static
FCDECL1(FC_BOOL_RET, HasInstantiation, PTR_ReflectClassBaseObject pType);
@@ -247,14 +251,18 @@ class RuntimeTypeHandle {
static FCDECL1(MethodDesc *, GetFirstIntroducedMethod, ReflectClassBaseObject* pType);
static FCDECL1(void, GetNextIntroducedMethod, MethodDesc **ppMethod);
- static FCDECL2(Object*, CreateInstanceForGenericType, ReflectClassBaseObject* pType
- , ReflectClassBaseObject* parameterType );
+ static
+ void QCALLTYPE CreateInstanceForAnotherGenericParameter(QCall::TypeHandle pTypeHandle, TypeHandle *pInstArray, INT32 cInstArray, QCall::ObjectHandleOnStack pInstantiatedObject);
static
FCDECL1(IMDInternalImport*, GetMetadataImport, ReflectClassBaseObject * pModuleUNSAFE);
static
PVOID QCALLTYPE AllocateTypeAssociatedMemory(QCall::TypeHandle type, UINT32 size);
+
+ // Helper methods not called by managed code
+
+ static void ValidateTypeAbleToBeInstantiated(TypeHandle typeHandle, bool fGetUninitializedObject);
};
class RuntimeMethodHandle {
diff --git a/src/coreclr/src/zap/zapinfo.cpp b/src/coreclr/src/zap/zapinfo.cpp
index a72c3792c2297..036457ab673d8 100644
--- a/src/coreclr/src/zap/zapinfo.cpp
+++ b/src/coreclr/src/zap/zapinfo.cpp
@@ -1073,6 +1073,16 @@ HRESULT ZapInfo::getMethodBlockCounts (
return S_OK;
}
+CORINFO_CLASS_HANDLE ZapInfo::getLikelyClass(
+ CORINFO_METHOD_HANDLE ftnHnd,
+ CORINFO_CLASS_HANDLE baseHnd,
+ UINT32 ilOffset,
+ UINT32* pLikelihood,
+ UINT32* pNumberOfClasses)
+{
+ return NULL;
+}
+
void ZapInfo::allocMem(
ULONG hotCodeSize, /* IN */
ULONG coldCodeSize, /* IN */
diff --git a/src/coreclr/src/zap/zapinfo.h b/src/coreclr/src/zap/zapinfo.h
index 3a44d2e7c0b54..74a8c0eebf2c9 100644
--- a/src/coreclr/src/zap/zapinfo.h
+++ b/src/coreclr/src/zap/zapinfo.h
@@ -313,6 +313,13 @@ class ZapInfo
ICorJitInfo::BlockCounts ** pBlockCounts,
UINT32 * pNumRuns);
+ CORINFO_CLASS_HANDLE getLikelyClass(
+ CORINFO_METHOD_HANDLE ftnHnd,
+ CORINFO_CLASS_HANDLE baseHnd,
+ UINT32 ilOffset,
+ UINT32 * pLikelihood,
+ UINT32 * pNumberOfClasses);
+
DWORD getJitFlags(CORJIT_FLAGS* jitFlags, DWORD sizeInBytes);
bool runWithErrorTrap(void (*function)(void*), void* param);
diff --git a/src/coreclr/src/zap/zapper.cpp b/src/coreclr/src/zap/zapper.cpp
index 97b47cba71b7d..a98fc6cc2934d 100644
--- a/src/coreclr/src/zap/zapper.cpp
+++ b/src/coreclr/src/zap/zapper.cpp
@@ -580,11 +580,15 @@ void Zapper::InitEE(BOOL fForceDebug, BOOL fForceProfile, BOOL fForceInstrument)
}
#else
- CorCompileRuntimeDlls ngenDllId;
+ LPCWSTR pwzJitName = nullptr;
- ngenDllId = CROSSGEN_COMPILER_INFO;
+ // Try to obtain a name for the jit library from the env. variable
+ IfFailThrow(CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_JitName, const_cast(&pwzJitName)));
+ if (pwzJitName == nullptr)
+ {
+ pwzJitName = CorCompileGetRuntimeDllName(CROSSGEN_COMPILER_INFO);
+ }
- LPCWSTR pwzJitName = CorCompileGetRuntimeDllName(ngenDllId);
LoadAndInitializeJITForNgen(pwzJitName, &m_hJitLib, &m_pJitCompiler);
#endif // FEATURE_MERGE_JIT_AND_ENGINE
diff --git a/src/installer/Directory.Build.props b/src/installer/Directory.Build.props
index c7fa3122d8509..15472af36dcb9 100644
--- a/src/installer/Directory.Build.props
+++ b/src/installer/Directory.Build.props
@@ -57,29 +57,6 @@
$(DefineConstants),TRACE
-
- .exe
-
-
-
- $(HostRuntimeIdentifier.Remove($(HostRuntimeIdentifier.LastIndexOf('-'))))-$(TargetArchitecture)
-
-
-
-
- win-$(TargetArchitecture)
- osx-$(TargetArchitecture)
- linux-$(TargetArchitecture)
- freebsd-$(TargetArchitecture)
- netbsd-$(TargetArchitecture)
- illumos-$(TargetArchitecture)
- solaris-$(TargetArchitecture)
- ios-$(TargetArchitecture)
- tvos-$(TargetArchitecture)
- android-$(TargetArchitecture)
- browser-$(TargetArchitecture)
-
-
$(OutputRid)
@@ -135,187 +112,6 @@
$(SharedHostInstallerStart)$(InstallerStartSuffix)-
$(HostFxrInstallerStart)$(InstallerStartSuffix)-
$(SharedFrameworkInstallerStart)$(InstallerStartSuffix)-
-
-
-
-
- false
- false
- false
- false
- false
- false
- false
- false
- false
- false
- false
- false
- false
- false
- false
- false
- false
-
-
-
-
- true
-
-
-
-
- true
- true
-
-
-
-
- true
- true
- true
-
-
-
-
- true
- true
- true
-
-
-
-
- true
- true
- true
- true
-
-
-
-
- true
- true
-
-
-
-
- true
- true
- true
-
-
-
-
- true
- true
- true
-
-
-
-
- true
- true
- true
-
-
-
-
- true
- true
- true
-
-
-
-
- true
- true
- true
-
-
-
-
- true
- true
- true
-
-
-
-
- true
- true
- true
-
-
-
-
- true
- true
- true
-
-
-
-
- true
- true
- true
-
-
-
-
- true
- true
-
-
-
-
- true
- true
-
-
-
-
- true
- true
-
-
-
-
- true
- true
-
-
-
-
- true
- true
-
-
- true
-
- true
-
-
-
-
-
- .zip
- .tar.gz
- .msi
- .pkg
- .deb
- .rpm
- .exe
- $(InstallerExtension)
-
-
-
-
- $(OutputRid)
- osx.10.10-x64
- rhel.7-x64
@@ -325,22 +121,4 @@
-->
true
-
-
- lib
- .so
- .dll
- .dylib
- lib
- .a
- .lib
-
-
-
- .map
- .ni.pdb
-
-
-
-
diff --git a/src/installer/Directory.Build.targets b/src/installer/Directory.Build.targets
index 7a859d808b229..dc2e7c7eed40c 100644
--- a/src/installer/Directory.Build.targets
+++ b/src/installer/Directory.Build.targets
@@ -89,11 +89,6 @@
Runtime/$(SharedFrameworkNugetVersion)/
-
- $(SharedFrameworkNugetVersion)-$(PackageTargetRid)
- $(HostResolverVersion)-$(PackageTargetRid)
-
-
$(HostVersion)
1
@@ -142,60 +137,6 @@
-
-
- $(CombinedInstallerStart)$(ProductMoniker)$(CombinedInstallerExtension)
- $(CombinedInstallerStart)$(ProductMoniker)-engine.exe
-
- $(SharedHostInstallerStart)$(ProductMoniker)$(InstallerExtension)
- $(HostFxrInstallerStart)$(HostResolverVersionMoniker)$(InstallerExtension)
- $(SharedFrameworkInstallerStart)$(ProductMoniker)$(InstallerExtension)
- $(DotnetRuntimeDependenciesPackageInstallerStart)$(ProductMoniker)$(InstallerExtension)
-
- dotnet-runtime-$(ProductMoniker)$(CompressedFileExtension)
- dotnet-hostfxr-internal-$(PackageTargetRid).$(HostResolverVersion)$(CompressedFileExtension)
- dotnet-nethost-$(AppHostVersion)-$(PackageTargetRid)$(CompressedFileExtension)
- dotnet-crossgen2-$(ProductMoniker)$(CompressedFileExtension)
- dotnet-runtime-internal-$(ProductMoniker)$(CompressedFileExtension)
- dotnet-runtime-symbols-$(ProductMoniker)$(CompressedFileExtension)
-
- $(DotnetHostFxrString)$(ProductBandVersion)
- $(HostFxrDebPkgName.ToLower())
- $(DotnetRuntimeString)$(ProductBandVersion)
- $(SharedFxDebPkgName.ToLower())
- $(DotnetRuntimeDependenciesPackageString)$(ProductBandVersion)
- $(RuntimeDependenciesDebPkgName.ToLower())
-
- dotnet-hostfxr-$(ProductBandVersion)
- $(HostFxrRpmPkgName.ToLower())
- dotnet-runtime-$(ProductBandVersion)
- $(SharedFxRpmPkgName.ToLower())
- $(DotnetRuntimeDependenciesPackageString)$(ProductBandVersion)
- $(RuntimeDependenciesRpmPkgName.ToLower())
-
-
-
- $(AssetOutputPath)dotnet-targeting-pack-$(ProductMoniker)$(InstallerExtension)
- $(AssetOutputPath)dotnet-apphost-pack-$(ProductMoniker)$(InstallerExtension)
- 2.1
- $(NetStandardProductBandVersion).$(PatchVersion)$(ProductVersionSuffix)-$(PackageTargetRid)
- $(AssetOutputPath)netstandard-targeting-pack-$(NetStandardProductMoniker)$(InstallerExtension)
-
-
-
-
- $(SharedHostInstallerStart)$(SharedFrameworkNugetVersion)-$(TargetArchitecture)$(InstallerExtension)
- $(HostFxrInstallerStart)$(HostResolverVersion)-$(TargetArchitecture)$(InstallerExtension)
- $(SharedFrameworkInstallerStart)$(SharedFrameworkNugetVersion)-$(TargetArchitecture)$(InstallerExtension)
-
-
-
-
- $(DotnetRuntimeDependenciesPackageInstallerStart)$(SharedFrameworkNugetVersion)-$(TargetArchitecture)$(InstallerExtension)
-
-
-
diff --git a/src/installer/corehost/cli/hostmisc/pal.h b/src/installer/corehost/cli/hostmisc/pal.h
index bf4785fb1a0d7..cdbb42a1a8def 100644
--- a/src/installer/corehost/cli/hostmisc/pal.h
+++ b/src/installer/corehost/cli/hostmisc/pal.h
@@ -164,7 +164,6 @@ namespace pal
inline const char_t* strerror(int errnum) { return ::_wcserror(errnum); }
bool pal_utf8string(const string_t& str, std::vector* out);
- bool utf8_palstring(const std::string& str, string_t* out);
bool pal_clrstring(const string_t& str, std::vector* out);
bool clr_palstring(const char* cstr, string_t* out);
@@ -223,7 +222,6 @@ namespace pal
inline const char_t* strerror(int errnum) { return ::strerror(errnum); }
inline bool pal_utf8string(const string_t& str, std::vector* out) { out->assign(str.begin(), str.end()); out->push_back('\0'); return true; }
- inline bool utf8_palstring(const std::string& str, string_t* out) { out->assign(str); return true; }
inline bool pal_clrstring(const string_t& str, std::vector* out) { return pal_utf8string(str, out); }
inline bool clr_palstring(const char* cstr, string_t* out) { out->assign(cstr); return true; }
@@ -305,7 +303,6 @@ namespace pal
bool get_default_bundle_extraction_base_dir(string_t& extraction_dir);
int xtoi(const char_t* input);
- bool unicode_palstring(const char16_t* str, pal::string_t* out);
bool get_loaded_library(const char_t *library_name, const char *symbol_name, /*out*/ dll_t *dll, /*out*/ string_t *path);
bool load_library(const string_t* path, dll_t* dll);
diff --git a/src/installer/corehost/cli/hostmisc/pal.unix.cpp b/src/installer/corehost/cli/hostmisc/pal.unix.cpp
index 6996618239ebd..20774cb9e11f9 100644
--- a/src/installer/corehost/cli/hostmisc/pal.unix.cpp
+++ b/src/installer/corehost/cli/hostmisc/pal.unix.cpp
@@ -17,7 +17,6 @@
#include
#include
#include
-#include
#include
#include "config.h"
@@ -266,16 +265,6 @@ int pal::xtoi(const char_t* input)
return atoi(input);
}
-bool pal::unicode_palstring(const char16_t* str, pal::string_t* out)
-{
- out->clear();
-
- std::wstring_convert, char16_t> conversion;
- out->assign(conversion.to_bytes(str));
-
- return true;
-}
-
bool pal::is_path_rooted(const pal::string_t& path)
{
return path.front() == '/';
diff --git a/src/installer/corehost/cli/hostmisc/pal.windows.cpp b/src/installer/corehost/cli/hostmisc/pal.windows.cpp
index c1a62a4d74d1e..7ddaab8c35060 100644
--- a/src/installer/corehost/cli/hostmisc/pal.windows.cpp
+++ b/src/installer/corehost/cli/hostmisc/pal.windows.cpp
@@ -8,7 +8,6 @@
#include
#include
-#include
#include
#include
@@ -623,11 +622,6 @@ static bool wchar_convert_helper(DWORD code_page, const char* cstr, int len, pal
return ::MultiByteToWideChar(code_page, 0, cstr, len, &(*out)[0], out->size()) != 0;
}
-bool pal::utf8_palstring(const std::string& str, pal::string_t* out)
-{
- return wchar_convert_helper(CP_UTF8, &str[0], str.size(), out);
-}
-
bool pal::pal_utf8string(const pal::string_t& str, std::vector* out)
{
out->clear();
@@ -652,12 +646,6 @@ bool pal::clr_palstring(const char* cstr, pal::string_t* out)
return wchar_convert_helper(CP_UTF8, cstr, ::strlen(cstr), out);
}
-bool pal::unicode_palstring(const char16_t* str, pal::string_t* out)
-{
- out->assign((const wchar_t *)str);
- return true;
-}
-
// Return if path is valid and file exists, return true and adjust path as appropriate.
bool pal::realpath(string_t* path, bool skip_error_logging)
{
diff --git a/src/installer/corehost/cli/hostpolicy/hostpolicy_context.cpp b/src/installer/corehost/cli/hostpolicy/hostpolicy_context.cpp
index 502d3a1b4a66b..48d7cd335dd91 100644
--- a/src/installer/corehost/cli/hostpolicy/hostpolicy_context.cpp
+++ b/src/installer/corehost/cli/hostpolicy/hostpolicy_context.cpp
@@ -23,18 +23,7 @@ namespace
// This function is an API exported to the runtime via the BUNDLE_PROBE property.
// This function used by the runtime to probe for bundled assemblies
// This function assumes that the currently executing app is a single-file bundle.
- //
- // bundle_probe recieves its path argument as cha16_t* instead of pal::char_t*, because:
- // * The host uses Unicode strings on Windows and UTF8 strings on Unix
- // * The runtime uses Unicode strings on all platforms
- // * Using a unicode encoded path presents a uniform interface to the runtime
- // and minimizes the number if Unicode <-> UTF8 conversions necessary.
- //
- // The unicode char type is char16_t* instead of whcar_t*, because:
- // * wchar_t is 16-bit encoding on Windows while it is 32-bit encoding on most Unix systems
- // * The runtime uses 16-bit encoded unicode characters.
-
- bool STDMETHODCALLTYPE bundle_probe(const char16_t* path, int64_t* offset, int64_t* size)
+ bool STDMETHODCALLTYPE bundle_probe(const char* path, int64_t* offset, int64_t* size)
{
if (path == nullptr)
{
@@ -43,7 +32,7 @@ namespace
pal::string_t file_path;
- if (!pal::unicode_palstring(path, &file_path))
+ if (!pal::clr_palstring(path, &file_path))
{
trace::warning(_X("Failure probing contents of the application bundle."));
trace::warning(_X("Failed to convert path [%ls] to UTF8"), path);
diff --git a/src/installer/corehost/corehost.cpp b/src/installer/corehost/corehost.cpp
index 9ae142c4fe427..0064f8b6a2a9f 100644
--- a/src/installer/corehost/corehost.cpp
+++ b/src/installer/corehost/corehost.cpp
@@ -53,8 +53,7 @@ bool is_exe_enabled_for_execution(pal::string_t* app_dll)
static const char hi_part[] = EMBED_HASH_HI_PART_UTF8;
static const char lo_part[] = EMBED_HASH_LO_PART_UTF8;
- std::string binding(&embed[0]);
- if (!pal::utf8_palstring(binding, app_dll))
+ if (!pal::clr_palstring(embed, app_dll))
{
trace::error(_X("The managed DLL bound to this executable could not be retrieved from the executable image."));
return false;
@@ -65,6 +64,7 @@ bool is_exe_enabled_for_execution(pal::string_t* app_dll)
size_t hi_len = (sizeof(hi_part) / sizeof(hi_part[0])) - 1;
size_t lo_len = (sizeof(lo_part) / sizeof(lo_part[0])) - 1;
+ std::string binding(&embed[0]);
if ((binding.size() >= (hi_len + lo_len)) &&
binding.compare(0, hi_len, &hi_part[0]) == 0 &&
binding.compare(hi_len, lo_len, &lo_part[0]) == 0)
diff --git a/src/installer/pkg/projects/Directory.Build.props b/src/installer/pkg/projects/Directory.Build.props
index b9ad8328b4d29..d64e7f18c1f1e 100644
--- a/src/installer/pkg/projects/Directory.Build.props
+++ b/src/installer/pkg/projects/Directory.Build.props
@@ -151,12 +151,10 @@
@(RestoreBuildRID)
- $(PackageRID)
+ $(OutputRid)
-
-
diff --git a/src/installer/pkg/projects/Directory.Build.targets b/src/installer/pkg/projects/Directory.Build.targets
index e29724f0f85ea..095938d03a4f8 100644
--- a/src/installer/pkg/projects/Directory.Build.targets
+++ b/src/installer/pkg/projects/Directory.Build.targets
@@ -133,8 +133,8 @@
Finds symbol files and injects them into the package build.
-->
-
-
+
+
@@ -162,7 +162,7 @@
-
+
diff --git a/src/installer/pkg/projects/Microsoft.NETCore.DotNetAppHost/Microsoft.NETCore.DotNetAppHost.pkgproj b/src/installer/pkg/projects/Microsoft.NETCore.DotNetAppHost/Microsoft.NETCore.DotNetAppHost.pkgproj
index 0ce0a5fcb2c35..eeedb0faea012 100644
--- a/src/installer/pkg/projects/Microsoft.NETCore.DotNetAppHost/Microsoft.NETCore.DotNetAppHost.pkgproj
+++ b/src/installer/pkg/projects/Microsoft.NETCore.DotNetAppHost/Microsoft.NETCore.DotNetAppHost.pkgproj
@@ -4,10 +4,10 @@
-
-
-
-
+
+
+
+
@@ -29,4 +29,4 @@
true
-
\ No newline at end of file
+
diff --git a/src/installer/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHost.pkgproj b/src/installer/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHost.pkgproj
index 000ba4fe48399..a957392ccde45 100644
--- a/src/installer/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHost.pkgproj
+++ b/src/installer/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHost.pkgproj
@@ -7,7 +7,7 @@
-
+
runtimes/$(PackageTargetRuntime)/native
true
diff --git a/src/installer/pkg/projects/Microsoft.NETCore.DotNetHostPolicy/Microsoft.NETCore.DotNetHostPolicy.pkgproj b/src/installer/pkg/projects/Microsoft.NETCore.DotNetHostPolicy/Microsoft.NETCore.DotNetHostPolicy.pkgproj
index 06f4c38912373..43d12c53b96dc 100644
--- a/src/installer/pkg/projects/Microsoft.NETCore.DotNetHostPolicy/Microsoft.NETCore.DotNetHostPolicy.pkgproj
+++ b/src/installer/pkg/projects/Microsoft.NETCore.DotNetHostPolicy/Microsoft.NETCore.DotNetHostPolicy.pkgproj
@@ -9,7 +9,7 @@
-
+
runtimes/$(PackageTargetRuntime)/native
true
diff --git a/src/installer/pkg/projects/Microsoft.NETCore.DotNetHostResolver/Microsoft.NETCore.DotNetHostResolver.pkgproj b/src/installer/pkg/projects/Microsoft.NETCore.DotNetHostResolver/Microsoft.NETCore.DotNetHostResolver.pkgproj
index 5a49dbb69b226..a2d33da0e18b2 100644
--- a/src/installer/pkg/projects/Microsoft.NETCore.DotNetHostResolver/Microsoft.NETCore.DotNetHostResolver.pkgproj
+++ b/src/installer/pkg/projects/Microsoft.NETCore.DotNetHostResolver/Microsoft.NETCore.DotNetHostResolver.pkgproj
@@ -11,7 +11,7 @@
-
+
runtimes/$(PackageTargetRuntime)/native
true
diff --git a/src/installer/pkg/projects/host-packages.proj b/src/installer/pkg/projects/host-packages.proj
index 89042f8169dd8..705c3c92dccaa 100644
--- a/src/installer/pkg/projects/host-packages.proj
+++ b/src/installer/pkg/projects/host-packages.proj
@@ -6,7 +6,7 @@
-
+
diff --git a/src/installer/pkg/projects/netcoreappRIDs.props b/src/installer/pkg/projects/netcoreappRIDs.props
index 86a934d2b9170..1382ff46b822b 100644
--- a/src/installer/pkg/projects/netcoreappRIDs.props
+++ b/src/installer/pkg/projects/netcoreappRIDs.props
@@ -1,10 +1,6 @@
-
- $(OutputRid)
-
-
diff --git a/src/installer/pkg/sfx/Directory.Build.props b/src/installer/pkg/sfx/Directory.Build.props
index a078c899d8159..6c4517eb7b5bf 100644
--- a/src/installer/pkg/sfx/Directory.Build.props
+++ b/src/installer/pkg/sfx/Directory.Build.props
@@ -20,6 +20,4 @@
true
true
-
-
diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj
index ed0ed5da583db..fee0cf0102bec 100644
--- a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj
+++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj
@@ -9,7 +9,7 @@
Microsoft.NETCore.App.Crossgen2.$(RuntimeIdentifier)
dotnet-crossgen2
crossgen2
- win-x64;linux-x64;linux-musl-x64
+ linux-x64;linux-musl-x64;osx-x64;win-x64
false
AddRuntimeFilesToPackage;
@@ -21,7 +21,7 @@
tools/
true
-
+
unix
win
@@ -33,17 +33,17 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
+
+
@@ -75,10 +75,10 @@
- <_crossTargetJit Include="@(CoreCLRCrossTargetFiles)" Condition="'%(FileName)' == '$(LibraryFilePrefix)clrjit' and '%(Extension)' == '$(LibraryFileExtension)'" />
- <_clrjit Include="@(RuntimeFiles)" Condition="'%(FileName)' == '$(LibraryFilePrefix)clrjit' and '%(Extension)' == '$(LibraryFileExtension)'" />
- <_crossTargetCrossgen Include="@(CoreCLRCrossTargetFiles)" Condition="'%(FileName)' == 'crossgen' and '%(Extension)' == '$(ApplicationFileExtension)'" />
- <_crossgen Include="@(RuntimeFiles)" Condition="'%(FileName)' == 'crossgen' and '%(Extension)' == '$(ApplicationFileExtension)'" />
+ <_crossTargetJit Include="@(CoreCLRCrossTargetFiles)" Condition="'%(FileName)' == '$(LibPrefix)clrjit' and '%(Extension)' == '$(LibSuffix)'" />
+ <_clrjit Include="@(RuntimeFiles)" Condition="'%(FileName)' == '$(LibPrefix)clrjit' and '%(Extension)' == '$(LibSuffix)'" />
+ <_crossTargetCrossgen Include="@(CoreCLRCrossTargetFiles)" Condition="'%(FileName)' == 'crossgen' and '%(Extension)' == '$(ExeSuffix)'" />
+ <_crossgen Include="@(RuntimeFiles)" Condition="'%(FileName)' == 'crossgen' and '%(Extension)' == '$(ExeSuffix)'" />
-
-
-
-
+
+
+
+
@@ -40,7 +40,7 @@
IsSymbolFile="true"
IsNative="true" />
<_SymbolFiles Condition="'$(TargetOS)' != 'windows'"
- Include="@(NativeRuntimeAsset->'%(RootDir)%(Directory)PDB/%(Filename)%(Extension)%(SymbolFileExtension)')"
+ Include="@(NativeRuntimeAsset->'%(RootDir)%(Directory)PDB/%(Filename)%(Extension)%(SymbolsSuffix)')"
IsSymbolFile="true"
IsNative="true" />
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 75ef79bc75801..2402d7fbe2ef6 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
@@ -44,8 +44,8 @@
-
-
+
+
@@ -108,10 +108,10 @@
- <_crossTargetJit Include="@(CoreCLRCrossTargetFiles)" Condition="'%(FileName)' == '$(LibraryFilePrefix)clrjit' and '%(Extension)' == '$(LibraryFileExtension)'" />
- <_clrjit Include="@(RuntimeFiles)" Condition="'%(FileName)' == '$(LibraryFilePrefix)clrjit' and '%(Extension)' == '$(LibraryFileExtension)'" />
- <_crossTargetCrossgen Include="@(CoreCLRCrossTargetFiles)" Condition="'%(FileName)' == 'crossgen' and '%(Extension)' == '$(ApplicationFileExtension)'" />
- <_crossgen Include="@(RuntimeFiles)" Condition="'%(FileName)' == 'crossgen' and '%(Extension)' == '$(ApplicationFileExtension)'" />
+ <_crossTargetJit Include="@(CoreCLRCrossTargetFiles)" Condition="'%(FileName)' == '$(LibPrefix)clrjit' and '%(Extension)' == '$(LibSuffix)'" />
+ <_clrjit Include="@(RuntimeFiles)" Condition="'%(FileName)' == '$(LibPrefix)clrjit' and '%(Extension)' == '$(LibSuffix)'" />
+ <_crossTargetCrossgen Include="@(CoreCLRCrossTargetFiles)" Condition="'%(FileName)' == 'crossgen' and '%(Extension)' == '$(ExeSuffix)'" />
+ <_crossgen Include="@(RuntimeFiles)" Condition="'%(FileName)' == 'crossgen' and '%(Extension)' == '$(ExeSuffix)'" />
-
+
-
diff --git a/src/installer/tests/Assets/TestProjects/BundleProbeTester/Program.cs b/src/installer/tests/Assets/TestProjects/BundleProbeTester/Program.cs
index 187e5d4c6fce4..ac963679797cc 100644
--- a/src/installer/tests/Assets/TestProjects/BundleProbeTester/Program.cs
+++ b/src/installer/tests/Assets/TestProjects/BundleProbeTester/Program.cs
@@ -13,7 +13,7 @@ public static class Program
// 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.LPWStr)] string path, IntPtr size, IntPtr offset);
+ public delegate byte BundleProbeDelegate([MarshalAs(UnmanagedType.LPUTF8Str)] string path, IntPtr size, IntPtr offset);
unsafe static bool Probe(BundleProbeDelegate bundleProbe, string path, bool isExpected)
{
diff --git a/src/installer/tests/Directory.Build.targets b/src/installer/tests/Directory.Build.targets
index 6e2bc2f03f3d6..7691ad32cee76 100644
--- a/src/installer/tests/Directory.Build.targets
+++ b/src/installer/tests/Directory.Build.targets
@@ -106,7 +106,7 @@
- $(HostRuntimeIdentifier)
+ $(PackageRID)
$(MSBuildProjectName)
$(ArtifactsDir)tests/$(Configuration)/
diff --git a/src/installer/tests/HostActivation.Tests/NativeHosting/Nethost.cs b/src/installer/tests/HostActivation.Tests/NativeHosting/Nethost.cs
index abcddd2394812..40a8473c483fa 100644
--- a/src/installer/tests/HostActivation.Tests/NativeHosting/Nethost.cs
+++ b/src/installer/tests/HostActivation.Tests/NativeHosting/Nethost.cs
@@ -105,7 +105,7 @@ public void GetHostFxrPath_DotNetRootParameter(bool explicitLoad, bool useAssemb
[InlineData(false, true, false, true)]
public void GetHostFxrPath_GlobalInstallation(bool explicitLoad, bool useAssemblyPath, bool useRegisteredLocation, bool isValid)
{
- // Overide the registry key for self-registered global installs.
+ // Override the registry key for self-registered global installs.
// If using the registered location, set the install location value to the valid/invalid root.
// If not using the registered location, do not set the value. When the value does not exist,
// the product falls back to the default install location.
diff --git a/src/libraries/Common/src/Extensions/ActivatorUtilities/ActivatorUtilities.cs b/src/libraries/Common/src/Extensions/ActivatorUtilities/ActivatorUtilities.cs
index 574fd893febaa..1300db8164873 100644
--- a/src/libraries/Common/src/Extensions/ActivatorUtilities/ActivatorUtilities.cs
+++ b/src/libraries/Common/src/Extensions/ActivatorUtilities/ActivatorUtilities.cs
@@ -50,7 +50,7 @@ public static object CreateInstance(
ConstructorMatcher bestMatcher = default;
- if (!instanceType.GetTypeInfo().IsAbstract)
+ if (!instanceType.IsAbstract)
{
foreach (ConstructorInfo? constructor in instanceType.GetConstructors())
{
@@ -323,7 +323,7 @@ private static bool TryCreateParameterMap(ParameterInfo[] constructorParameters,
for (int i = 0; i < argumentTypes.Length; i++)
{
bool foundMatch = false;
- TypeInfo? givenParameter = argumentTypes[i].GetTypeInfo();
+ Type? givenParameter = argumentTypes[i];
for (int j = 0; j < constructorParameters.Length; j++)
{
@@ -333,7 +333,7 @@ private static bool TryCreateParameterMap(ParameterInfo[] constructorParameters,
continue;
}
- if (constructorParameters[j].ParameterType.GetTypeInfo().IsAssignableFrom(givenParameter))
+ if (constructorParameters[j].ParameterType.IsAssignableFrom(givenParameter))
{
foundMatch = true;
parameterMap[j] = i;
@@ -369,13 +369,13 @@ public int Match(object[] givenParameters)
int applyExactLength = 0;
for (int givenIndex = 0; givenIndex != givenParameters.Length; givenIndex++)
{
- TypeInfo? givenType = givenParameters[givenIndex]?.GetType().GetTypeInfo();
+ Type? givenType = givenParameters[givenIndex]?.GetType();
bool givenMatched = false;
for (int applyIndex = applyIndexStart; givenMatched == false && applyIndex != _parameters.Length; ++applyIndex)
{
if (_parameterValues[applyIndex] == null &&
- _parameters[applyIndex].ParameterType.GetTypeInfo().IsAssignableFrom(givenType))
+ _parameters[applyIndex].ParameterType.IsAssignableFrom(givenType))
{
givenMatched = true;
_parameterValues[applyIndex] = givenParameters[givenIndex];
diff --git a/src/libraries/Common/src/Internal/Cryptography/UniversalCryptoEncryptor.cs b/src/libraries/Common/src/Internal/Cryptography/UniversalCryptoEncryptor.cs
index e89baaa8ee2e4..aecb5be18bc6c 100644
--- a/src/libraries/Common/src/Internal/Cryptography/UniversalCryptoEncryptor.cs
+++ b/src/libraries/Common/src/Internal/Cryptography/UniversalCryptoEncryptor.cs
@@ -156,7 +156,7 @@ private int PadBlock(ReadOnlySpan block, Span destination)
//
// xx 00 00 00 00 00 00 00
case PaddingMode.Zeros:
- if (padBytes == InputBlockSize)
+ if (padBytes == PaddingSizeBytes)
{
padBytes = 0;
}
diff --git a/src/libraries/Common/src/Interop/SunOS/procfs/Interop.ProcFsStat.TryReadProcessStatusInfo.cs b/src/libraries/Common/src/Interop/SunOS/procfs/Interop.ProcFsStat.TryReadProcessStatusInfo.cs
new file mode 100644
index 0000000000000..032186eb6a7e8
--- /dev/null
+++ b/src/libraries/Common/src/Interop/SunOS/procfs/Interop.ProcFsStat.TryReadProcessStatusInfo.cs
@@ -0,0 +1,36 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Runtime.InteropServices;
+
+internal static partial class Interop
+{
+ internal static partial class procfs
+ {
+ ///
+ /// Attempts to get status info for the specified process ID.
+ ///
+ /// PID of the process to read status info for.
+ /// The pointer to processStatus instance.
+ ///
+ /// true if the process status was read; otherwise, false.
+ ///
+ [DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_ReadProcessStatusInfo", SetLastError = true)]
+ private static extern unsafe bool TryReadProcessStatusInfo(int pid, ProcessStatusInfo* processStatus);
+
+ internal struct ProcessStatusInfo
+ {
+ internal nuint ResidentSetSize;
+ // add more fields when needed.
+ }
+
+ internal static unsafe bool TryReadProcessStatusInfo(int pid, out ProcessStatusInfo statusInfo)
+ {
+ statusInfo = default;
+ fixed (ProcessStatusInfo* pStatusInfo = &statusInfo)
+ {
+ return TryReadProcessStatusInfo(pid, pStatusInfo);
+ }
+ }
+ }
+}
diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FreeEnvironmentStrings.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FreeEnvironmentStrings.cs
index f9765e66d4d00..5af20c071ca1d 100644
--- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FreeEnvironmentStrings.cs
+++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FreeEnvironmentStrings.cs
@@ -7,7 +7,7 @@ internal static partial class Interop
{
internal static partial class Kernel32
{
- [DllImport(Libraries.Kernel32, EntryPoint = "FreeEnvironmentStringsW", SetLastError = true, CharSet = CharSet.Unicode, BestFitMapping = false, ExactSpelling = true)]
- internal static extern unsafe bool FreeEnvironmentStrings(char* lpszEnvironmentBlock);
+ [DllImport(Libraries.Kernel32, ExactSpelling = true)]
+ internal static extern unsafe BOOL FreeEnvironmentStringsW(char* lpszEnvironmentBlock);
}
}
diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetEnvironmentStrings.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetEnvironmentStrings.cs
index 4fcdbe0c2e767..55452013da027 100644
--- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetEnvironmentStrings.cs
+++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetEnvironmentStrings.cs
@@ -7,7 +7,7 @@ internal static partial class Interop
{
internal static partial class Kernel32
{
- [DllImport(Libraries.Kernel32, EntryPoint = "GetEnvironmentStringsW", SetLastError = true, CharSet = CharSet.Unicode, BestFitMapping = false, ExactSpelling = true)]
- internal static extern unsafe char* GetEnvironmentStrings();
+ [DllImport(Libraries.Kernel32, ExactSpelling = true)]
+ internal static extern unsafe char* GetEnvironmentStringsW();
}
}
diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/SSPIWrapper.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/SSPIWrapper.cs
index 43d9d051b9ea6..d99bd95f4ddbe 100644
--- a/src/libraries/Common/src/Interop/Windows/SspiCli/SSPIWrapper.cs
+++ b/src/libraries/Common/src/Interop/Windows/SspiCli/SSPIWrapper.cs
@@ -118,7 +118,7 @@ public static unsafe SafeFreeCredentials AcquireCredentialsHandle(ISSPIInterface
if (errorCode != 0)
{
- if (NetEventSource.IsEnabled) NetEventSource.Error(null, SR.Format(SR.net_log_operation_failed_with_error, nameof(AcquireCredentialsHandle), $"0x{errorCode:X}"));
+ if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(null, SR.Format(SR.net_log_operation_failed_with_error, nameof(AcquireCredentialsHandle), $"0x{errorCode:X}"));
throw new Win32Exception(errorCode);
}
diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/SecuritySafeHandles.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/SecuritySafeHandles.cs
index b69d62803b3ad..76539c89247c6 100644
--- a/src/libraries/Common/src/Interop/Windows/SspiCli/SecuritySafeHandles.cs
+++ b/src/libraries/Common/src/Interop/Windows/SspiCli/SecuritySafeHandles.cs
@@ -307,7 +307,7 @@ public static unsafe int AcquireCredentialsHandle(
ref outCredential._handle,
out timeStamp);
- if (NetEventSource.IsEnabled) NetEventSource.Verbose(null, $"{nameof(Interop.SspiCli.AcquireCredentialsHandleW)} returns 0x{errorCode:x}, handle = {outCredential}");
+ if (NetEventSource.Log.IsEnabled()) NetEventSource.Verbose(null, $"{nameof(Interop.SspiCli.AcquireCredentialsHandleW)} returns 0x{errorCode:x}, handle = {outCredential}");
if (errorCode != 0)
{
diff --git a/src/libraries/Common/src/Interop/Windows/WinHttp/Interop.winhttp_types.cs b/src/libraries/Common/src/Interop/Windows/WinHttp/Interop.winhttp_types.cs
index 0ab94178f5d5c..aac3f8091a913 100644
--- a/src/libraries/Common/src/Interop/Windows/WinHttp/Interop.winhttp_types.cs
+++ b/src/libraries/Common/src/Interop/Windows/WinHttp/Interop.winhttp_types.cs
@@ -164,6 +164,8 @@ internal partial class WinHttp
public const uint WINHTTP_OPTION_WEB_SOCKET_RECEIVE_BUFFER_SIZE = 122;
public const uint WINHTTP_OPTION_WEB_SOCKET_SEND_BUFFER_SIZE = 123;
+ public const uint WINHTTP_OPTION_TCP_KEEPALIVE = 152;
+
public enum WINHTTP_WEB_SOCKET_BUFFER_TYPE
{
WINHTTP_WEB_SOCKET_BINARY_MESSAGE_BUFFER_TYPE = 0,
@@ -276,6 +278,15 @@ public struct WINHTTP_ASYNC_RESULT
public uint dwError;
}
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct tcp_keepalive
+ {
+ public uint onoff;
+ public uint keepalivetime;
+ public uint keepaliveinterval;
+ }
+
public const uint API_RECEIVE_RESPONSE = 1;
public const uint API_QUERY_DATA_AVAILABLE = 2;
public const uint API_READ_DATA = 3;
diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/NetEventSource.Common.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/NetEventSource.Common.cs
index 174ad40e273d4..6905c66e6dbff 100644
--- a/src/libraries/Common/src/System/Net/Http/aspnetcore/NetEventSource.Common.cs
+++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/NetEventSource.Common.cs
@@ -95,7 +95,7 @@ public static void Enter(object? thisOrContextObject, FormattableString? formatt
{
DebugValidateArg(thisOrContextObject);
DebugValidateArg(formattableString);
- if (IsEnabled) Log.Enter(IdOf(thisOrContextObject), memberName, formattableString != null ? Format(formattableString) : NoParameters);
+ if (Log.IsEnabled()) Log.Enter(IdOf(thisOrContextObject), memberName, formattableString != null ? Format(formattableString) : NoParameters);
}
/// Logs entrance to a method.
@@ -107,7 +107,7 @@ public static void Enter(object? thisOrContextObject, object arg0, [CallerMember
{
DebugValidateArg(thisOrContextObject);
DebugValidateArg(arg0);
- if (IsEnabled) Log.Enter(IdOf(thisOrContextObject), memberName, $"({Format(arg0)})");
+ if (Log.IsEnabled()) Log.Enter(IdOf(thisOrContextObject), memberName, $"({Format(arg0)})");
}
/// Logs entrance to a method.
@@ -121,7 +121,7 @@ public static void Enter(object? thisOrContextObject, object arg0, object arg1,
DebugValidateArg(thisOrContextObject);
DebugValidateArg(arg0);
DebugValidateArg(arg1);
- if (IsEnabled) Log.Enter(IdOf(thisOrContextObject), memberName, $"({Format(arg0)}, {Format(arg1)})");
+ if (Log.IsEnabled()) Log.Enter(IdOf(thisOrContextObject), memberName, $"({Format(arg0)}, {Format(arg1)})");
}
/// Logs entrance to a method.
@@ -137,7 +137,7 @@ public static void Enter(object? thisOrContextObject, object arg0, object arg1,
DebugValidateArg(arg0);
DebugValidateArg(arg1);
DebugValidateArg(arg2);
- if (IsEnabled) Log.Enter(IdOf(thisOrContextObject), memberName, $"({Format(arg0)}, {Format(arg1)}, {Format(arg2)})");
+ if (Log.IsEnabled()) Log.Enter(IdOf(thisOrContextObject), memberName, $"({Format(arg0)}, {Format(arg1)}, {Format(arg2)})");
}
[Event(EnterEventId, Level = EventLevel.Informational, Keywords = Keywords.EnterExit)]
@@ -155,7 +155,7 @@ public static void Exit(object? thisOrContextObject, FormattableString? formatta
{
DebugValidateArg(thisOrContextObject);
DebugValidateArg(formattableString);
- if (IsEnabled) Log.Exit(IdOf(thisOrContextObject), memberName, formattableString != null ? Format(formattableString) : NoParameters);
+ if (Log.IsEnabled()) Log.Exit(IdOf(thisOrContextObject), memberName, formattableString != null ? Format(formattableString) : NoParameters);
}
/// Logs exit from a method.
@@ -167,7 +167,7 @@ public static void Exit(object? thisOrContextObject, object arg0, [CallerMemberN
{
DebugValidateArg(thisOrContextObject);
DebugValidateArg(arg0);
- if (IsEnabled) Log.Exit(IdOf(thisOrContextObject), memberName, Format(arg0).ToString());
+ if (Log.IsEnabled()) Log.Exit(IdOf(thisOrContextObject), memberName, Format(arg0).ToString());
}
/// Logs exit from a method.
@@ -181,7 +181,7 @@ public static void Exit(object? thisOrContextObject, object arg0, object arg1, [
DebugValidateArg(thisOrContextObject);
DebugValidateArg(arg0);
DebugValidateArg(arg1);
- if (IsEnabled) Log.Exit(IdOf(thisOrContextObject), memberName, $"{Format(arg0)}, {Format(arg1)}");
+ if (Log.IsEnabled()) Log.Exit(IdOf(thisOrContextObject), memberName, $"{Format(arg0)}, {Format(arg1)}");
}
[Event(ExitEventId, Level = EventLevel.Informational, Keywords = Keywords.EnterExit)]
@@ -199,7 +199,7 @@ public static void Info(object? thisOrContextObject, FormattableString? formatta
{
DebugValidateArg(thisOrContextObject);
DebugValidateArg(formattableString);
- if (IsEnabled) Log.Info(IdOf(thisOrContextObject), memberName, formattableString != null ? Format(formattableString) : NoParameters);
+ if (Log.IsEnabled()) Log.Info(IdOf(thisOrContextObject), memberName, formattableString != null ? Format(formattableString) : NoParameters);
}
/// Logs an information message.
@@ -211,7 +211,7 @@ public static void Info(object? thisOrContextObject, object? message, [CallerMem
{
DebugValidateArg(thisOrContextObject);
DebugValidateArg(message);
- if (IsEnabled) Log.Info(IdOf(thisOrContextObject), memberName, Format(message).ToString());
+ if (Log.IsEnabled()) Log.Info(IdOf(thisOrContextObject), memberName, Format(message).ToString());
}
[Event(InfoEventId, Level = EventLevel.Informational, Keywords = Keywords.Default)]
@@ -229,7 +229,7 @@ public static void Error(object? thisOrContextObject, FormattableString formatta
{
DebugValidateArg(thisOrContextObject);
DebugValidateArg(formattableString);
- if (IsEnabled) Log.ErrorMessage(IdOf(thisOrContextObject), memberName, Format(formattableString));
+ if (Log.IsEnabled()) Log.ErrorMessage(IdOf(thisOrContextObject), memberName, Format(formattableString));
}
/// Logs an error message.
@@ -241,7 +241,7 @@ public static void Error(object? thisOrContextObject, object message, [CallerMem
{
DebugValidateArg(thisOrContextObject);
DebugValidateArg(message);
- if (IsEnabled) Log.ErrorMessage(IdOf(thisOrContextObject), memberName, Format(message).ToString());
+ if (Log.IsEnabled()) Log.ErrorMessage(IdOf(thisOrContextObject), memberName, Format(message).ToString());
}
[Event(ErrorEventId, Level = EventLevel.Error, Keywords = Keywords.Default)]
@@ -269,7 +269,7 @@ public static void DumpBuffer(object? thisOrContextObject, byte[] buffer, [Calle
[NonEvent]
public static void DumpBuffer(object? thisOrContextObject, byte[] buffer, int offset, int count, [CallerMemberName] string? memberName = null)
{
- if (IsEnabled && offset >= 0 && offset <= buffer.Length - count)
+ if (Log.IsEnabled() && offset >= 0 && offset <= buffer.Length - count)
{
count = Math.Min(count, MaxDumpSize);
@@ -295,7 +295,7 @@ public static unsafe void DumpBuffer(object? thisOrContextObject, IntPtr bufferP
Debug.Assert(bufferPtr != IntPtr.Zero);
Debug.Assert(count >= 0);
- if (IsEnabled)
+ if (Log.IsEnabled())
{
var buffer = new byte[Math.Min(count, MaxDumpSize)];
fixed (byte* targetPtr = buffer)
@@ -321,7 +321,7 @@ public static void Associate(object first, object second, [CallerMemberName] str
{
DebugValidateArg(first);
DebugValidateArg(second);
- if (IsEnabled) Log.Associate(IdOf(first), memberName, IdOf(first), IdOf(second));
+ if (Log.IsEnabled()) Log.Associate(IdOf(first), memberName, IdOf(first), IdOf(second));
}
/// Logs a relationship between two objects.
@@ -335,7 +335,7 @@ public static void Associate(object? thisOrContextObject, object first, object s
DebugValidateArg(thisOrContextObject);
DebugValidateArg(first);
DebugValidateArg(second);
- if (IsEnabled) Log.Associate(IdOf(thisOrContextObject), memberName, IdOf(first), IdOf(second));
+ if (Log.IsEnabled()) Log.Associate(IdOf(thisOrContextObject), memberName, IdOf(first), IdOf(second));
}
[Event(AssociateEventId, Level = EventLevel.Informational, Keywords = Keywords.Default, Message = "[{2}]<-->[{3}]")]
@@ -348,7 +348,7 @@ private void Associate(string thisOrContextObject, string? memberName, string fi
[Conditional("DEBUG_NETEVENTSOURCE_MISUSE")]
private static void DebugValidateArg(object? arg)
{
- if (!IsEnabled)
+ if (!Log.IsEnabled())
{
Debug.Assert(!(arg is ValueType), $"Should not be passing value type {arg?.GetType()} to logging without IsEnabled check");
Debug.Assert(!(arg is FormattableString), $"Should not be formatting FormattableString \"{arg}\" if tracing isn't enabled");
@@ -358,12 +358,9 @@ private static void DebugValidateArg(object? arg)
[Conditional("DEBUG_NETEVENTSOURCE_MISUSE")]
private static void DebugValidateArg(FormattableString? arg)
{
- Debug.Assert(IsEnabled || arg == null, $"Should not be formatting FormattableString \"{arg}\" if tracing isn't enabled");
+ Debug.Assert(Log.IsEnabled() || arg == null, $"Should not be formatting FormattableString \"{arg}\" if tracing isn't enabled");
}
- public static new bool IsEnabled =>
- Log.IsEnabled();
-
[NonEvent]
public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance;
diff --git a/src/libraries/Common/src/System/Net/WebSockets/ManagedWebSocket.cs b/src/libraries/Common/src/System/Net/WebSockets/ManagedWebSocket.cs
index 7ed7a15994062..cffafdd0c41aa 100644
--- a/src/libraries/Common/src/System/Net/WebSockets/ManagedWebSocket.cs
+++ b/src/libraries/Common/src/System/Net/WebSockets/ManagedWebSocket.cs
@@ -7,6 +7,7 @@
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
+using System.Runtime.Versioning;
using System.Security.Cryptography;
using System.Text;
using System.Threading;
@@ -23,6 +24,7 @@ namespace System.Net.WebSockets
/// a send operation while another is in progress or a receive operation while another is in progress will
/// result in an exception.
///
+ [UnsupportedOSPlatform("browser")]
internal sealed partial class ManagedWebSocket : WebSocket
{
/// Creates a from a connected to a websocket endpoint.
diff --git a/src/libraries/Common/src/System/Threading/Tasks/ForceAsyncAwaiter.cs b/src/libraries/Common/src/System/Threading/Tasks/ForceAsyncAwaiter.cs
deleted file mode 100644
index 9b5d88f5b993b..0000000000000
--- a/src/libraries/Common/src/System/Threading/Tasks/ForceAsyncAwaiter.cs
+++ /dev/null
@@ -1,45 +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;
-
-namespace System.Threading.Tasks
-{
- internal static partial class TaskAwaiters
- {
- ///
- /// Returns an awaitable/awaiter that will ensure the continuation is executed
- /// asynchronously on the thread pool, even if the task is already completed
- /// by the time the await occurs. Effectively, it is equivalent to awaiting
- /// with ConfigureAwait(false) and then queuing the continuation with Task.Run,
- /// but it avoids the extra hop if the continuation already executed asynchronously.
- ///
- public static ForceAsyncAwaiter ForceAsync(this Task task)
- {
- return new ForceAsyncAwaiter(task);
- }
- }
-
- internal readonly struct ForceAsyncAwaiter : ICriticalNotifyCompletion
- {
- private readonly Task _task;
-
- internal ForceAsyncAwaiter(Task task) { _task = task; }
-
- public ForceAsyncAwaiter GetAwaiter() { return this; }
-
- public bool IsCompleted { get { return false; } } // the purpose of this type is to always force a continuation
-
- public void GetResult() { _task.GetAwaiter().GetResult(); }
-
- public void OnCompleted(Action action)
- {
- _task.ConfigureAwait(false).GetAwaiter().OnCompleted(action);
- }
-
- public void UnsafeOnCompleted(Action action)
- {
- _task.ConfigureAwait(false).GetAwaiter().UnsafeOnCompleted(action);
- }
- }
-}
diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesCipherTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesCipherTests.cs
index 8883d60e003ee..d3fbeb7628d01 100644
--- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesCipherTests.cs
+++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesCipherTests.cs
@@ -127,17 +127,17 @@ public static void DecryptKnownCFB128_192()
{
byte[] encryptedBytes = new byte[]
{
- 0x7C, 0xC6, 0xEE, 0xD8, 0xED, 0xB5, 0x3F, 0x8A,
- 0x90, 0x95, 0x12, 0xD2, 0xBC, 0x9A, 0x96, 0x1E,
- 0x4E, 0xC4, 0xD1, 0x15, 0xA4, 0x7F, 0x32, 0xA4,
- 0xD1, 0xFD, 0x8E, 0x02, 0x45, 0xE8, 0x93, 0x3C,
- 0x3C, 0x91, 0x3F, 0xA4, 0x7F, 0x99, 0xF7, 0x3A,
- 0x53, 0x0C, 0x0B, 0xFD, 0x01, 0xC5, 0xBD, 0x76,
- 0xB7, 0xCF, 0x2B, 0x52, 0x34, 0xB1, 0xA6, 0xA4,
- 0x29, 0x2F, 0x7D, 0x1C, 0x97, 0x3A, 0xE2, 0x75,
- 0x3E, 0xEB, 0xFC, 0xB7, 0xBB, 0x7A, 0xC0, 0x66,
- 0x34, 0x25, 0xCF, 0x2D, 0xE2, 0x7E, 0x23, 0x06,
- 0x10, 0xFE, 0xEA, 0xB3, 0x0F, 0x1D, 0x2C, 0xDD,
+ 0x7C, 0xC6, 0xEE, 0xD8, 0xED, 0xB5, 0x3F, 0x8A,
+ 0x90, 0x95, 0x12, 0xD2, 0xBC, 0x9A, 0x96, 0x1E,
+ 0x4E, 0xC4, 0xD1, 0x15, 0xA4, 0x7F, 0x32, 0xA4,
+ 0xD1, 0xFD, 0x8E, 0x02, 0x45, 0xE8, 0x93, 0x3C,
+ 0x3C, 0x91, 0x3F, 0xA4, 0x7F, 0x99, 0xF7, 0x3A,
+ 0x53, 0x0C, 0x0B, 0xFD, 0x01, 0xC5, 0xBD, 0x76,
+ 0xB7, 0xCF, 0x2B, 0x52, 0x34, 0xB1, 0xA6, 0xA4,
+ 0x29, 0x2F, 0x7D, 0x1C, 0x97, 0x3A, 0xE2, 0x75,
+ 0x3E, 0xEB, 0xFC, 0xB7, 0xBB, 0x7A, 0xC0, 0x66,
+ 0x34, 0x25, 0xCF, 0x2D, 0xE2, 0x7E, 0x23, 0x06,
+ 0x10, 0xFE, 0xEA, 0xB3, 0x0F, 0x1D, 0x2C, 0xDD,
0x72, 0x64, 0x51, 0x78, 0x1D, 0x75, 0xD2, 0x17
};
@@ -149,17 +149,17 @@ public static void DecryptKnownCFB128_128()
{
byte[] encryptedBytes = new byte[]
{
- 0x5B, 0x63, 0x3D, 0x1C, 0x0C, 0x8E, 0xD4, 0xF4,
- 0xE5, 0x5F, 0xA0, 0xAF, 0x2F, 0xF5, 0xAE, 0x59,
- 0xB9, 0xC4, 0xFA, 0x02, 0x11, 0x37, 0xEB, 0x38,
- 0x5B, 0x2F, 0x1D, 0xF5, 0x03, 0xD1, 0xFD, 0x85,
- 0x4B, 0xAA, 0x4F, 0x29, 0x94, 0x09, 0x31, 0x4C,
- 0x4D, 0xD6, 0x99, 0xE3, 0x4D, 0xC4, 0x3A, 0x40,
- 0x97, 0x58, 0xA5, 0x26, 0x80, 0xA8, 0xCA, 0xFA,
- 0x6D, 0x19, 0x3B, 0x6B, 0x6F, 0x75, 0x76, 0x83,
- 0x90, 0x31, 0x07, 0x86, 0x35, 0xD6, 0xAB, 0xB4,
- 0x65, 0x07, 0x0A, 0x0A, 0xA3, 0x7A, 0xD7, 0x16,
- 0xE2, 0xC5, 0x3B, 0xE0, 0x42, 0x5F, 0xFA, 0xEF,
+ 0x5B, 0x63, 0x3D, 0x1C, 0x0C, 0x8E, 0xD4, 0xF4,
+ 0xE5, 0x5F, 0xA0, 0xAF, 0x2F, 0xF5, 0xAE, 0x59,
+ 0xB9, 0xC4, 0xFA, 0x02, 0x11, 0x37, 0xEB, 0x38,
+ 0x5B, 0x2F, 0x1D, 0xF5, 0x03, 0xD1, 0xFD, 0x85,
+ 0x4B, 0xAA, 0x4F, 0x29, 0x94, 0x09, 0x31, 0x4C,
+ 0x4D, 0xD6, 0x99, 0xE3, 0x4D, 0xC4, 0x3A, 0x40,
+ 0x97, 0x58, 0xA5, 0x26, 0x80, 0xA8, 0xCA, 0xFA,
+ 0x6D, 0x19, 0x3B, 0x6B, 0x6F, 0x75, 0x76, 0x83,
+ 0x90, 0x31, 0x07, 0x86, 0x35, 0xD6, 0xAB, 0xB4,
+ 0x65, 0x07, 0x0A, 0x0A, 0xA3, 0x7A, 0xD7, 0x16,
+ 0xE2, 0xC5, 0x3B, 0xE0, 0x42, 0x5F, 0xFA, 0xEF,
0xE1, 0x2E, 0x40, 0x84, 0x36, 0x66, 0xB1, 0xBA
};
@@ -655,7 +655,7 @@ public static void VerifyKnownTransform_CFB128_128_NoPadding_4_Fails()
feedbackSize: 128)
);
}
-
+
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindows7))]
public static void VerifyKnownTransform_CFB128_128_PKCS7_4()
{
@@ -682,15 +682,17 @@ public static void VerifyKnownTransform_CFB8_128_PKCS7_4()
feedbackSize: 8);
}
- [Fact]
- public static void VerifyKnownTransform_CFB8_128_NoPadding_0_Extended()
+ [Theory]
+ [InlineData(PaddingMode.None)]
+ [InlineData(PaddingMode.Zeros)]
+ public static void VerifyKnownTransform_CFB8_128_NoOrZeroPadding_0_Extended(PaddingMode paddingMode)
{
// NIST CAVP AESMMT.ZIP CFB8MMT128.rsp, [ENCRYPT] COUNT=0
// plaintext zero-extended to a full block, cipherBytes extended value
// provided by .NET Framework
TestAesTransformDirectKey(
CipherMode.CFB,
- PaddingMode.None,
+ paddingMode,
key: "c57d699d89df7cfbef71c080a6b10ac3".HexToByteArray(),
iv: "fcb2bc4c006b87483978796a2ae2c42e".HexToByteArray(),
plainBytes: ("61" + "000000000000000000000000000000").HexToByteArray(),
@@ -698,15 +700,17 @@ public static void VerifyKnownTransform_CFB8_128_NoPadding_0_Extended()
feedbackSize: 8);
}
- [Fact]
- public static void VerifyKnownTransform_CFB8_128_NoPadding_9_Extended()
+ [Theory]
+ [InlineData(PaddingMode.None)]
+ [InlineData(PaddingMode.Zeros)]
+ public static void VerifyKnownTransform_CFB8_128_NoOrZeroPadding_9_Extended(PaddingMode paddingMode)
{
// NIST CAVP AESMMT.ZIP CFB8MMT128.rsp, [ENCRYPT] COUNT=9
// plaintext zero-extended to a full block, cipherBytes extended value
// provided by .NET Framework
TestAesTransformDirectKey(
CipherMode.CFB,
- PaddingMode.None,
+ paddingMode,
key: "3a6f9159263fa6cef2a075caface5817".HexToByteArray(),
iv: "0fc23662b7dbf73827f0c7de321ca36e".HexToByteArray(),
plainBytes: ("87efeb8d559ed3367728" + "000000000000").HexToByteArray(),
@@ -714,15 +718,17 @@ public static void VerifyKnownTransform_CFB8_128_NoPadding_9_Extended()
feedbackSize: 8);
}
- [Fact]
- public static void VerifyKnownTransform_CFB8_192_NoPadding_0_Extended()
+ [Theory]
+ [InlineData(PaddingMode.None)]
+ [InlineData(PaddingMode.Zeros)]
+ public static void VerifyKnownTransform_CFB8_192_NoOrZeroPadding_0_Extended(PaddingMode paddingMode)
{
// NIST CAVP AESMMT.ZIP CFB8MMT192.rsp, [ENCRYPT] COUNT=0
// plaintext zero-extended to a full block, cipherBytes extended value
// provided by .NET Framework
TestAesTransformDirectKey(
CipherMode.CFB,
- PaddingMode.None,
+ paddingMode,
key: "32a1b0e3da368db563d7316b9779d3327e53d9a6d287ed97".HexToByteArray(),
iv: "3dd0e7e21f09d5842f3a699da9b57346".HexToByteArray(),
plainBytes: ("54" + "000000000000000000000000000000").HexToByteArray(),
@@ -730,15 +736,17 @@ public static void VerifyKnownTransform_CFB8_192_NoPadding_0_Extended()
feedbackSize: 8);
}
- [Fact]
- public static void VerifyKnownTransform_CFB8_192_NoPadding_9_Extended()
+ [Theory]
+ [InlineData(PaddingMode.None)]
+ [InlineData(PaddingMode.Zeros)]
+ public static void VerifyKnownTransform_CFB8_192_NoOrZeroPadding_9_Extended(PaddingMode paddingMode)
{
// NIST CAVP AESMMT.ZIP CFB8MMT192.rsp, [ENCRYPT] COUNT=9
// plaintext zero-extended to a full block, cipherBytes extended value
// provided by .NET Framework
TestAesTransformDirectKey(
CipherMode.CFB,
- PaddingMode.None,
+ paddingMode,
key: "537e7bf661fd4024a024613f15b13690f7d0c847c1e18965".HexToByteArray(),
iv: "3a81f9d9d3c155b0caad5d73349476fc".HexToByteArray(),
plainBytes: ("d3d8b9b984adc24237ee" + "000000000000").HexToByteArray(),
@@ -746,15 +754,17 @@ public static void VerifyKnownTransform_CFB8_192_NoPadding_9_Extended()
feedbackSize: 8);
}
- [Fact]
- public static void VerifyKnownTransform_CFB8_256_NoPadding_0_Extended()
+ [Theory]
+ [InlineData(PaddingMode.None)]
+ [InlineData(PaddingMode.Zeros)]
+ public static void VerifyKnownTransform_CFB8_256_NoOrZeroPadding_0_Extended(PaddingMode paddingMode)
{
// NIST CAVP AESMMT.ZIP CFB8MMT256.rsp, [ENCRYPT] COUNT=0
// plaintext zero-extended to a full block, cipherBytes extended value
// provided by .NET Framework
TestAesTransformDirectKey(
CipherMode.CFB,
- PaddingMode.None,
+ paddingMode,
key: "34e8091cee09f1bd3ebf1e8f05f51bfbd4899ef2ae006a3a0f7875052cdd46c8".HexToByteArray(),
iv: "43eb4dcc4b04a80216a20e4a09a7abb5".HexToByteArray(),
plainBytes: ("f9" + "000000000000000000000000000000").HexToByteArray(),
@@ -762,15 +772,17 @@ public static void VerifyKnownTransform_CFB8_256_NoPadding_0_Extended()
feedbackSize: 8);
}
- [Fact]
- public static void VerifyKnownTransform_CFB8_256_NoPadding_9_Extended()
+ [Theory]
+ [InlineData(PaddingMode.None)]
+ [InlineData(PaddingMode.Zeros)]
+ public static void VerifyKnownTransform_CFB8_256_NoOrZeroPadding_9_Extended(PaddingMode paddingMode)
{
// NIST CAVP AESMMT.ZIP CFB8MMT256.rsp, [ENCRYPT] COUNT=9
// plaintext zero-extended to a full block, cipherBytes extended value
// provided by .NET Framework
TestAesTransformDirectKey(
CipherMode.CFB,
- PaddingMode.None,
+ paddingMode,
key: "ebbb4566b5e182e0f072466b0b311df38f9175bc0213a5530bce2ec4d74f400d".HexToByteArray(),
iv: "0956a48e01002c9e16376d6e308dbad1".HexToByteArray(),
plainBytes: ("b0fe25ac8d3d28a2f471" + "000000000000").HexToByteArray(),
@@ -927,18 +939,28 @@ public static void VerifyKnownTransform_CFB128_256_NoPadding_1_Extended()
feedbackSize: 128);
}
- [Fact]
- public static void AesZeroPad()
+ [Theory]
+ [InlineData(CipherMode.CBC)]
+ [InlineData(CipherMode.CFB)]
+ public static void AesZeroPad(CipherMode cipherMode)
{
+ if (cipherMode == CipherMode.CFB && PlatformDetection.IsWindows7)
+ {
+ // Windows 7 does not support CFB128.
+ return;
+ }
+
byte[] decryptedBytes;
byte[] expectedAnswer;
using (Aes aes = AesFactory.Create())
{
+ aes.Mode = cipherMode;
aes.Padding = PaddingMode.Zeros;
+ aes.FeedbackSize = 128;
- int blockBytes = aes.BlockSize / 8;
- int missingBytes = blockBytes - (s_multiBlockBytes.Length % blockBytes);
+ int alignBytes = aes.BlockSize / 8; // Feedback size is same as block size, both are 128 bits
+ int missingBytes = alignBytes - (s_multiBlockBytes.Length % alignBytes);
// Zero-padding doesn't have enough information to remove the trailing zeroes.
// Therefore we expect the answer of ZeroPad(s_multiBlockBytes).
@@ -1049,7 +1071,7 @@ private static void TestAesDecrypt(
{
aes.Mode = mode;
aes.Key = key;
-
+
if (feedbackSize.HasValue)
{
aes.FeedbackSize = feedbackSize.Value;
diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DES/DESCipherTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DES/DESCipherTests.cs
index de5e5641a467c..82b076821f469 100644
--- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DES/DESCipherTests.cs
+++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DES/DESCipherTests.cs
@@ -254,14 +254,16 @@ public static void EncryptWithLargeOutputBuffer(bool blockAlignedOutput)
}
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindows7))]
- public static void VerifyKnownTransform_CFB8_NoPadding_0()
+ [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindows7))]
+ [InlineData(PaddingMode.None)]
+ [InlineData(PaddingMode.Zeros)]
+ public static void VerifyKnownTransform_CFB8_NoOrZeroPadding_0(PaddingMode paddingMode)
{
// NIST CAVS TDESMMT.ZIP TCFB8MMT2.rsp, [DECRYPT] COUNT=0
// used only key1, cipherBytes computed using openssl
TestDESTransformDirectKey(
CipherMode.CFB,
- PaddingMode.None,
+ paddingMode,
key: "fb978a0b6dc2c467".HexToByteArray(),
iv: "8b97579ea5ac300f".HexToByteArray(),
plainBytes: "80".HexToByteArray(),
@@ -270,14 +272,16 @@ public static void VerifyKnownTransform_CFB8_NoPadding_0()
);
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindows7))]
- public static void VerifyKnownTransform_CFB8_NoPadding_1()
+ [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindows7))]
+ [InlineData(PaddingMode.None)]
+ [InlineData(PaddingMode.Zeros)]
+ public static void VerifyKnownTransform_CFB8_NoOrZeroPadding_1(PaddingMode paddingMode)
{
// NIST CAVS TDESMMT.ZIP TCFB8MMT2.rsp, [DECRYPT] COUNT=1
// used only key1, cipherBytes computed using openssl
TestDESTransformDirectKey(
CipherMode.CFB,
- PaddingMode.None,
+ paddingMode,
key: "9b04c86dd31a8a58".HexToByteArray(),
iv: "52cd77d49fc72347".HexToByteArray(),
plainBytes: "2fef".HexToByteArray(),
@@ -286,14 +290,16 @@ public static void VerifyKnownTransform_CFB8_NoPadding_1()
);
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindows7))]
- public static void VerifyKnownTransform_CFB8_NoPadding_2()
+ [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindows7))]
+ [InlineData(PaddingMode.None)]
+ [InlineData(PaddingMode.Zeros)]
+ public static void VerifyKnownTransform_CFB8_NoOrZeroPadding_2(PaddingMode paddingMode)
{
// NIST CAVS TDESMMT.ZIP TCFB8MMT2.rsp, [DECRYPT] COUNT=2
// used only key1, cipherBytes computed using openssl
TestDESTransformDirectKey(
CipherMode.CFB,
- PaddingMode.None,
+ paddingMode,
key: "fbb667e340586b5b".HexToByteArray(),
iv: "459e8b8736715791".HexToByteArray(),
plainBytes: "061704".HexToByteArray(),
@@ -365,14 +371,16 @@ public static void DecryptorReuse_LeadsToSameResults(CipherMode cipherMode, int
}
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindows7))]
- public static void VerifyKnownTransform_CFB8_NoPadding_3()
+ [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindows7))]
+ [InlineData(PaddingMode.None)]
+ [InlineData(PaddingMode.Zeros)]
+ public static void VerifyKnownTransform_CFB8_NoOrZeroPadding_3(PaddingMode paddingMode)
{
// NIST CAVS TDESMMT.ZIP TCFB8MMT2.rsp, [DECRYPT] COUNT=3
// used only key1, cipherBytes computed using openssl
TestDESTransformDirectKey(
CipherMode.CFB,
- PaddingMode.None,
+ paddingMode,
key: "4a575d02515d40b0".HexToByteArray(),
iv: "ab27e9f02affa532".HexToByteArray(),
plainBytes: "55f75b95".HexToByteArray(),
@@ -397,14 +405,16 @@ public static void VerifyKnownTransform_CFB8_PKCS7_3()
);
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindows7))]
- public static void VerifyKnownTransform_CFB8_NoPadding_4()
+ [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindows7))]
+ [InlineData(PaddingMode.None)]
+ [InlineData(PaddingMode.Zeros)]
+ public static void VerifyKnownTransform_CFB8_NoOrZeroPadding_4(PaddingMode paddingMode)
{
// NIST CAVS TDESMMT.ZIP TCFB8MMT2.rsp, [DECRYPT] COUNT=4
// used only key1, cipherBytes computed using openssl
TestDESTransformDirectKey(
CipherMode.CFB,
- PaddingMode.None,
+ paddingMode,
key: "91a834855e6bab31".HexToByteArray(),
iv: "7838aaad4e64640b".HexToByteArray(),
plainBytes: "c3851c0ab4".HexToByteArray(),
@@ -413,14 +423,16 @@ public static void VerifyKnownTransform_CFB8_NoPadding_4()
);
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindows7))]
- public static void VerifyKnownTransform_CFB8_NoPadding_5()
+ [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindows7))]
+ [InlineData(PaddingMode.None)]
+ [InlineData(PaddingMode.Zeros)]
+ public static void VerifyKnownTransform_CFB8_NoOrZeroPadding_5(PaddingMode paddingMode)
{
// NIST CAVS TDESMMT.ZIP TCFB8MMT2.rsp, [DECRYPT] COUNT=5
// used only key1, cipherBytes computed using openssl
TestDESTransformDirectKey(
CipherMode.CFB,
- PaddingMode.None,
+ paddingMode,
key: "04d923abd9291c3e".HexToByteArray(),
iv: "191f8794944e601c".HexToByteArray(),
plainBytes: "6fe8f67d2af1".HexToByteArray(),
@@ -429,14 +441,16 @@ public static void VerifyKnownTransform_CFB8_NoPadding_5()
);
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindows7))]
- public static void VerifyKnownTransform_CFB8_NoPadding_6()
+ [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindows7))]
+ [InlineData(PaddingMode.None)]
+ [InlineData(PaddingMode.Zeros)]
+ public static void VerifyKnownTransform_CFB8_NoOrZeroPadding_6(PaddingMode paddingMode)
{
// NIST CAVS TDESMMT.ZIP TCFB8MMT2.rsp, [DECRYPT] COUNT=6
// used only key1, cipherBytes computed using openssl
TestDESTransformDirectKey(
CipherMode.CFB,
- PaddingMode.None,
+ paddingMode,
key: "a7799e7f5dfe54ce".HexToByteArray(),
iv: "370184c749d04a20".HexToByteArray(),
plainBytes: "2b4228b769795b".HexToByteArray(),
@@ -445,14 +459,16 @@ public static void VerifyKnownTransform_CFB8_NoPadding_6()
);
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindows7))]
- public static void VerifyKnownTransform_CFB8_NoPadding_7()
+ [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindows7))]
+ [InlineData(PaddingMode.None)]
+ [InlineData(PaddingMode.Zeros)]
+ public static void VerifyKnownTransform_CFB8_NoOrZeroPadding_7(PaddingMode paddingMode)
{
// NIST CAVS TDESMMT.ZIP TCFB8MMT2.rsp, [DECRYPT] COUNT=7
// used only key1, cipherBytes computed using openssl
TestDESTransformDirectKey(
CipherMode.CFB,
- PaddingMode.None,
+ paddingMode,
key: "6bfe3d3df8c1e0d3".HexToByteArray(),
iv: "51e4c5c29e858da6".HexToByteArray(),
plainBytes: "4cb3554fd0b9ec82".HexToByteArray(),
@@ -461,14 +477,16 @@ public static void VerifyKnownTransform_CFB8_NoPadding_7()
);
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindows7))]
- public static void VerifyKnownTransform_CFB8_NoPadding_8()
+ [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindows7))]
+ [InlineData(PaddingMode.None)]
+ [InlineData(PaddingMode.Zeros)]
+ public static void VerifyKnownTransform_CFB8_NoOrZeroPadding_8(PaddingMode paddingMode)
{
// NIST CAVS TDESMMT.ZIP TCFB8MMT2.rsp, [DECRYPT] COUNT=8
// used only key1, cipherBytes computed using openssl
TestDESTransformDirectKey(
CipherMode.CFB,
- PaddingMode.None,
+ paddingMode,
key: "e0264aec13e63db9".HexToByteArray(),
iv: "bd8795dba79930d6".HexToByteArray(),
plainBytes: "79068e2943f02914af".HexToByteArray(),
@@ -477,14 +495,16 @@ public static void VerifyKnownTransform_CFB8_NoPadding_8()
);
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindows7))]
- public static void VerifyKnownTransform_CFB8_NoPadding_9()
+ [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindows7))]
+ [InlineData(PaddingMode.None)]
+ [InlineData(PaddingMode.Zeros)]
+ public static void VerifyKnownTransform_CFB8_NoOrZeroPadding_9(PaddingMode paddingMode)
{
// NIST CAVS TDESMMT.ZIP TCFB8MMT2.rsp, [DECRYPT] COUNT=9
// used only key1, cipherBytes computed using openssl
TestDESTransformDirectKey(
CipherMode.CFB,
- PaddingMode.None,
+ paddingMode,
key: "7ca28938ba6bec1f".HexToByteArray(),
iv: "953896586e49d38f".HexToByteArray(),
plainBytes: "2ea956d4a211db6859b7".HexToByteArray(),
diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/TripleDES/TripleDESCipherTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/TripleDES/TripleDESCipherTests.cs
index ffdd4842f39a9..e46e8a2514f03 100644
--- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/TripleDES/TripleDESCipherTests.cs
+++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/TripleDES/TripleDESCipherTests.cs
@@ -42,13 +42,15 @@ public static void TripleDESInvalidKeySizes()
}
}
- [Fact]
- public static void VerifyKnownTransform_CFB8_NoPadding_0()
+ [Theory]
+ [InlineData(PaddingMode.None)]
+ [InlineData(PaddingMode.Zeros)]
+ public static void VerifyKnownTransform_CFB8_NoOrZeroPadding_0(PaddingMode paddingMode)
{
// NIST CAVS TDESMMT.ZIP TCFB8MMT2.rsp, [DECRYPT] COUNT=0
TestTripleDESTransformDirectKey(
CipherMode.CFB,
- PaddingMode.None,
+ paddingMode,
key: "fb978a0b6dc2c467e3cb52329de95161fb978a0b6dc2c467".HexToByteArray(),
iv: "8b97579ea5ac300f".HexToByteArray(),
plainBytes: "80".HexToByteArray(),
@@ -57,13 +59,15 @@ public static void VerifyKnownTransform_CFB8_NoPadding_0()
);
}
- [Fact]
- public static void VerifyKnownTransform_CFB8_NoPadding_1()
+ [Theory]
+ [InlineData(PaddingMode.None)]
+ [InlineData(PaddingMode.Zeros)]
+ public static void VerifyKnownTransform_CFB8_NoOrZeroPadding_1(PaddingMode paddingMode)
{
// NIST CAVS TDESMMT.ZIP TCFB8MMT2.rsp, [DECRYPT] COUNT=1
TestTripleDESTransformDirectKey(
CipherMode.CFB,
- PaddingMode.None,
+ paddingMode,
key: "9b04c86dd31a8a589876101549d6e0109b04c86dd31a8a58".HexToByteArray(),
iv: "52cd77d49fc72347".HexToByteArray(),
plainBytes: "2fef".HexToByteArray(),
@@ -72,13 +76,15 @@ public static void VerifyKnownTransform_CFB8_NoPadding_1()
);
}
- [Fact]
- public static void VerifyKnownTransform_CFB8_NoPadding_2()
+ [Theory]
+ [InlineData(PaddingMode.None)]
+ [InlineData(PaddingMode.Zeros)]
+ public static void VerifyKnownTransform_CFB8_NoOrZeroPadding_2(PaddingMode paddingMode)
{
// NIST CAVS TDESMMT.ZIP TCFB8MMT2.rsp, [DECRYPT] COUNT=2
TestTripleDESTransformDirectKey(
CipherMode.CFB,
- PaddingMode.None,
+ paddingMode,
key: "fbb667e340586b5b5ef7c87049b93257fbb667e340586b5b".HexToByteArray(),
iv: "459e8b8736715791".HexToByteArray(),
plainBytes: "061704".HexToByteArray(),
@@ -117,13 +123,15 @@ public static void VerifyKnownTransform_CFB64_PKCS7_2()
);
}
- [Fact]
- public static void VerifyKnownTransform_CFB8_NoPadding_3()
+ [Theory]
+ [InlineData(PaddingMode.None)]
+ [InlineData(PaddingMode.Zeros)]
+ public static void VerifyKnownTransform_CFB8_NoOrZeroPadding_3(PaddingMode paddingMode)
{
// NIST CAVS TDESMMT.ZIP TCFB8MMT2.rsp, [DECRYPT] COUNT=3
TestTripleDESTransformDirectKey(
CipherMode.CFB,
- PaddingMode.None,
+ paddingMode,
key: "4a575d02515d40b0a40d830bd9b315134a575d02515d40b0".HexToByteArray(),
iv: "ab27e9f02affa532".HexToByteArray(),
plainBytes: "55f75b95".HexToByteArray(),
@@ -132,13 +140,15 @@ public static void VerifyKnownTransform_CFB8_NoPadding_3()
);
}
- [Fact]
- public static void VerifyKnownTransform_CFB8_NoPadding_4()
+ [Theory]
+ [InlineData(PaddingMode.None)]
+ [InlineData(PaddingMode.Zeros)]
+ public static void VerifyKnownTransform_CFB8_NoOrZeroPadding_4(PaddingMode paddingMode)
{
// NIST CAVS TDESMMT.ZIP TCFB8MMT2.rsp, [DECRYPT] COUNT=4
TestTripleDESTransformDirectKey(
CipherMode.CFB,
- PaddingMode.None,
+ paddingMode,
key: "91a834855e6bab31c7fd6be657ceb9ec91a834855e6bab31".HexToByteArray(),
iv: "7838aaad4e64640b".HexToByteArray(),
plainBytes: "c3851c0ab4".HexToByteArray(),
@@ -147,13 +157,15 @@ public static void VerifyKnownTransform_CFB8_NoPadding_4()
);
}
- [Fact]
- public static void VerifyKnownTransform_CFB8_NoPadding_5()
+ [Theory]
+ [InlineData(PaddingMode.None)]
+ [InlineData(PaddingMode.Zeros)]
+ public static void VerifyKnownTransform_CFB8_NoOrZeroPadding_5(PaddingMode paddingMode)
{
// NIST CAVS TDESMMT.ZIP TCFB8MMT2.rsp, [DECRYPT] COUNT=5
TestTripleDESTransformDirectKey(
CipherMode.CFB,
- PaddingMode.None,
+ paddingMode,
key: "04d923abd9291c3e4954a8b52fdabcc804d923abd9291c3e".HexToByteArray(),
iv: "191f8794944e601c".HexToByteArray(),
plainBytes: "6fe8f67d2af1".HexToByteArray(),
@@ -162,13 +174,15 @@ public static void VerifyKnownTransform_CFB8_NoPadding_5()
);
}
- [Fact]
- public static void VerifyKnownTransform_CFB8_NoPadding_6()
+ [Theory]
+ [InlineData(PaddingMode.None)]
+ [InlineData(PaddingMode.Zeros)]
+ public static void VerifyKnownTransform_CFB8_NoOrZeroPadding_6(PaddingMode paddingMode)
{
// NIST CAVS TDESMMT.ZIP TCFB8MMT2.rsp, [DECRYPT] COUNT=6
TestTripleDESTransformDirectKey(
CipherMode.CFB,
- PaddingMode.None,
+ paddingMode,
key: "a7799e7f5dfe54ce13376401e96de075a7799e7f5dfe54ce".HexToByteArray(),
iv: "370184c749d04a20".HexToByteArray(),
plainBytes: "2b4228b769795b".HexToByteArray(),
@@ -177,13 +191,15 @@ public static void VerifyKnownTransform_CFB8_NoPadding_6()
);
}
- [Fact]
- public static void VerifyKnownTransform_CFB8_NoPadding_7()
+ [Theory]
+ [InlineData(PaddingMode.None)]
+ [InlineData(PaddingMode.Zeros)]
+ public static void VerifyKnownTransform_CFB8_NoOrZeroPadding_7(PaddingMode paddingMode)
{
// NIST CAVS TDESMMT.ZIP TCFB8MMT2.rsp, [DECRYPT] COUNT=7
TestTripleDESTransformDirectKey(
CipherMode.CFB,
- PaddingMode.None,
+ paddingMode,
key: "6bfe3d3df8c1e0d34ffe0dbf854c940e6bfe3d3df8c1e0d3".HexToByteArray(),
iv: "51e4c5c29e858da6".HexToByteArray(),
plainBytes: "4cb3554fd0b9ec82".HexToByteArray(),
@@ -192,13 +208,15 @@ public static void VerifyKnownTransform_CFB8_NoPadding_7()
);
}
- [Fact]
- public static void VerifyKnownTransform_CFB8_NoPadding_8()
+ [Theory]
+ [InlineData(PaddingMode.None)]
+ [InlineData(PaddingMode.Zeros)]
+ public static void VerifyKnownTransform_CFB8_NoOrZeroPadding_8(PaddingMode paddingMode)
{
// NIST CAVS TDESMMT.ZIP TCFB8MMT2.rsp, [DECRYPT] COUNT=8
TestTripleDESTransformDirectKey(
CipherMode.CFB,
- PaddingMode.None,
+ paddingMode,
key: "e0264aec13e63db991f8c120c4b9b6dae0264aec13e63db9".HexToByteArray(),
iv: "bd8795dba79930d6".HexToByteArray(),
plainBytes: "79068e2943f02914af".HexToByteArray(),
@@ -207,13 +225,15 @@ public static void VerifyKnownTransform_CFB8_NoPadding_8()
);
}
- [Fact]
- public static void VerifyKnownTransform_CFB8_NoPadding_9()
+ [Theory]
+ [InlineData(PaddingMode.None)]
+ [InlineData(PaddingMode.Zeros)]
+ public static void VerifyKnownTransform_CFB8_NoOrZeroPadding_9(PaddingMode paddingMode)
{
// NIST CAVS TDESMMT.ZIP TCFB8MMT2.rsp, [DECRYPT] COUNT=9
TestTripleDESTransformDirectKey(
CipherMode.CFB,
- PaddingMode.None,
+ paddingMode,
key: "7ca28938ba6bec1ffec78f7cd69761947ca28938ba6bec1f".HexToByteArray(),
iv: "953896586e49d38f".HexToByteArray(),
plainBytes: "2ea956d4a211db6859b7".HexToByteArray(),
diff --git a/src/libraries/Common/tests/System/Security/Cryptography/X509Certificates/RevocationResponder.cs b/src/libraries/Common/tests/System/Security/Cryptography/X509Certificates/RevocationResponder.cs
index b590321d6a1d1..67b5ad4a2a455 100644
--- a/src/libraries/Common/tests/System/Security/Cryptography/X509Certificates/RevocationResponder.cs
+++ b/src/libraries/Common/tests/System/Security/Cryptography/X509Certificates/RevocationResponder.cs
@@ -90,7 +90,10 @@ internal void HandleRequest()
if (context != null)
{
- HandleRequest(context);
+ ThreadPool.QueueUserWorkItem(
+ state => HandleRequest(state),
+ context,
+ true);
}
}
@@ -108,7 +111,10 @@ internal async Task HandleRequestAsync()
if (context != null)
{
- HandleRequest(context);
+ ThreadPool.QueueUserWorkItem(
+ state => HandleRequest(state),
+ context,
+ true);
}
}
@@ -375,14 +381,14 @@ private static void Trace(string trace)
Console.WriteLine(trace);
}
}
+ }
- internal enum DelayedActionsFlag : byte
- {
- None = 0,
- Ocsp = 0b1,
- Crl = 0b10,
- Aia = 0b100,
- All = 0b11111111
- }
+ public enum DelayedActionsFlag : byte
+ {
+ None = 0,
+ Ocsp = 0b1,
+ Crl = 0b10,
+ Aia = 0b100,
+ All = 0b11111111
}
}
diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Unix.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Unix.cs
index 80f824eb2dbde..d3922536a5d3e 100644
--- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Unix.cs
+++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Unix.cs
@@ -164,7 +164,7 @@ private static DistroInfo GetDistroInfo()
// What we want is major release as minor releases should be compatible.
result.VersionId = ToVersion(RuntimeInformation.OSDescription.Split()[1].Split('.')[0]);
}
- else if (IsIllumos)
+ else if (Isillumos)
{
// examples:
// on OmniOS
@@ -195,7 +195,8 @@ private static DistroInfo GetDistroInfo()
// example:
// SunOS 5.11 11.3
result.Id = "Solaris";
- result.VersionId = ToVersion(RuntimeInformation.OSDescription.Split(' ')[2]); // e.g. 11.3
+ // we only need the major version; 11
+ result.VersionId = ToVersion(RuntimeInformation.OSDescription.Split(' ')[2].Split('.')[0]); // e.g. 11
}
else if (File.Exists("/etc/os-release"))
{
diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs
index 3bb73dfe682a3..b4520cc674845 100644
--- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs
+++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs
@@ -28,7 +28,7 @@ public static partial class PlatformDetection
public static bool IsNetBSD => RuntimeInformation.IsOSPlatform(OSPlatform.Create("NETBSD"));
public static bool IsiOS => RuntimeInformation.IsOSPlatform(OSPlatform.Create("IOS"));
public static bool IstvOS => RuntimeInformation.IsOSPlatform(OSPlatform.Create("TVOS"));
- public static bool IsIllumos => RuntimeInformation.IsOSPlatform(OSPlatform.Create("ILLUMOS"));
+ public static bool Isillumos => RuntimeInformation.IsOSPlatform(OSPlatform.Create("ILLUMOS"));
public static bool IsSolaris => RuntimeInformation.IsOSPlatform(OSPlatform.Create("SOLARIS"));
public static bool IsBrowser => RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER"));
public static bool IsNotBrowser => !IsBrowser;
@@ -125,7 +125,7 @@ public static bool IsNonZeroLowerBoundArraySupported
// Windows - Schannel supports alpn from win8.1/2012 R2 and higher.
// Linux - OpenSsl supports alpn from openssl 1.0.2 and higher.
// OSX - SecureTransport doesn't expose alpn APIs. TODO https://github.com/dotnet/runtime/issues/27727
- public static bool IsOpenSslSupported => IsLinux || IsFreeBSD || IsIllumos || IsSolaris;
+ public static bool IsOpenSslSupported => IsLinux || IsFreeBSD || Isillumos || IsSolaris;
public static bool SupportsAlpn => (IsWindows && !IsWindows7) ||
(IsOpenSslSupported &&
diff --git a/src/libraries/Common/tests/Tests/System/IO/StreamConformanceTests.cs b/src/libraries/Common/tests/Tests/System/IO/StreamConformanceTests.cs
index cdee183453909..6db15d9bf0cd3 100644
--- a/src/libraries/Common/tests/Tests/System/IO/StreamConformanceTests.cs
+++ b/src/libraries/Common/tests/Tests/System/IO/StreamConformanceTests.cs
@@ -905,7 +905,7 @@ public virtual async Task Read_PopulatedWithInitialData_ToEof_Success(ReadWriteM
Assert.Equal(size, stream.Seek(0, SeekOrigin.Current));
}
- Assert.Equal(expected, actual.ToArray());
+ AssertExtensions.Equal(expected, actual.ToArray());
}
[Theory]
@@ -990,7 +990,7 @@ public virtual async Task Write_CustomMemoryManager_Success(bool useAsync)
stream.Position = 0;
byte[] actual = (byte[])expected.Clone();
Assert.Equal(actual.Length, await ReadAllAsync(ReadWriteMode.AsyncMemory, stream, actual, 0, actual.Length));
- Assert.Equal(expected, actual);
+ AssertExtensions.Equal(expected, actual);
}
[Theory]
@@ -1032,7 +1032,7 @@ public virtual async Task CopyTo_CopiesAllDataFromRightPosition_Success(
Assert.Equal(expected.Length, stream.Position);
}
- Assert.Equal(expected.AsSpan(position).ToArray(), destination.ToArray());
+ AssertExtensions.Equal(expected.AsSpan(position).ToArray(), destination.ToArray());
}
public static IEnumerable CopyTo_CopiesAllDataFromRightPosition_Success_MemberData()
@@ -1073,7 +1073,7 @@ public virtual async Task Write_Read_Success(ReadWriteMode mode)
for (int i = 0; i < Copies; i++)
{
int bytesRead = await ReadAllAsync(mode, stream, actual, 0, actual.Length);
- Assert.Equal(expected, actual);
+ AssertExtensions.Equal(expected, actual);
Array.Clear(actual, 0, actual.Length);
}
}
@@ -1686,7 +1686,7 @@ public virtual async Task ReadWriteByte_Success()
readerBytes[i] = (byte)r;
}
- Assert.Equal(writerBytes, readerBytes);
+ AssertExtensions.Equal(writerBytes, readerBytes);
await writes;
@@ -1760,7 +1760,7 @@ public virtual async Task ReadWrite_Success(ReadWriteMode mode, int writeSize, b
}
Assert.Equal(readerBytes.Length, n);
- Assert.Equal(writerBytes, readerBytes);
+ AssertExtensions.Equal(writerBytes, readerBytes);
await writes;
@@ -2367,7 +2367,7 @@ public virtual async Task CopyToAsync_AllDataCopied(int byteCount, bool useAsync
writeable.Dispose();
await copyTask;
- Assert.Equal(dataToCopy, results.ToArray());
+ AssertExtensions.Equal(dataToCopy, results.ToArray());
}
[OuterLoop("May take several seconds")]
diff --git a/src/libraries/Directory.Build.props b/src/libraries/Directory.Build.props
index 076d8145cc2b7..9d600a0efd951 100644
--- a/src/libraries/Directory.Build.props
+++ b/src/libraries/Directory.Build.props
@@ -1,6 +1,7 @@
true
+ true
@@ -19,24 +20,9 @@
$(RepositoryEngineeringDir)LicenseHeader.txt
-
- $(HostRuntimeIdentifier.Remove($(HostRuntimeIdentifier.LastIndexOf('-'))))
-
-
- $([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant)
- arm
- arm64
- wasm
- x64
- x64
-
-
- $(TargetOS.ToLowerInvariant())
-
Debug
$([System.Text.RegularExpressions.Regex]::Replace('$(TargetFramework)', '(-[^;]+)', ''))
@@ -93,57 +79,6 @@
-
- <_runtimeOSVersionIndex>$(RuntimeOS.IndexOfAny(".-0123456789"))
- <_runtimeOSFamily Condition="'$(_runtimeOSVersionIndex)' != '-1'">$(RuntimeOS.SubString(0, $(_runtimeOSVersionIndex)))
- <_portableOS>linux
- <_portableOS Condition="'$(RuntimeOS)' == 'linux-musl'">linux-musl
- <_portableOS Condition="'$(_runtimeOSFamily)' == 'win' or '$(TargetOS)' == 'windows'">win
- <_portableOS Condition="'$(_runtimeOSFamily)' == 'osx'">osx
- <_portableOS Condition="'$(_runtimeOSFamily)' == 'FreeBSD'">freebsd
- <_portableOS Condition="'$(_runtimeOSFamily)' == 'illumos'">illumos
- <_portableOS Condition="'$(_runtimeOSFamily)' == 'Solaris'">solaris
- <_portableOS Condition="'$(RuntimeOS)' == 'Browser'">browser
- <_portableOS Condition="'$(RuntimeOS)' == 'ios'">ios
- <_portableOS Condition="'$(RuntimeOS)' == 'tvos'">tvos
- <_portableOS Condition="'$(RuntimeOS)' == 'android'">android
-
- <_runtimeOS>$(RuntimeOS)
- <_runtimeOS Condition="'$(_runtimeOS)' == 'tizen.4.0.0'">linux
- <_runtimeOS Condition="'$(_runtimeOS)' == 'tizen.5.0.0'">linux
- <_runtimeOS Condition="'$(PortableBuild)' == 'true'">$(_portableOS)
- $(_runtimeOS)-x64
- $(_runtimeOS)-$(HostArch)
-
- linux-x64
-
-
- <_buildingInOSX>$([MSBuild]::IsOSPlatform('OSX'))
- win-x64
- osx-x64
- linux-x64
-
-
- win-x64
- osx-x64
- linux-x64
-
-
- osx-x64
- $(ToolRuntimeRID)
-
-
- <_portableOS Condition="'$(TargetOS)' == 'Unix' and '$(_runtimeOSFamily)' != 'osx' and '$(_runtimeOSFamily)' != 'FreeBSD' and '$(_runtimeOS)' != 'linux-musl' and '$(_runtimeOSFamily)' != 'illumos' and '$(_runtimeOSFamily)' != 'Solaris'">linux
-
-
- <_portableOS Condition="'$(TargetOS)' == 'Unix' and '$(_runtimeOSFamily)' != 'osx' and '$(_runtimeOSFamily)' != 'FreeBSD' and '$(_runtimeOS)' != 'linux-musl' and '$(_runtimeOSFamily)' != 'illumos' and '$(_runtimeOSFamily)' != 'Solaris'">linux
-
- <_packageRID />
- <_packageRID Condition="'$(PortableBuild)' == 'true'">$(_portableOS)-$(TargetArchitecture)
- $(_packageRID)
- $(RuntimeOS)-$(TargetArchitecture)
-
-
true
diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpInvokeBinder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpInvokeBinder.cs
index b4314c6c6c597..dd25a30c4dbcd 100644
--- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpInvokeBinder.cs
+++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpInvokeBinder.cs
@@ -30,7 +30,7 @@ public void PopulateSymbolTableWithName(Type callingType, ArgumentObject[] argum
string ICSharpBinder.Name => "Invoke";
- Type[] ICSharpInvokeOrInvokeMemberBinder.TypeArguments => Array.Empty();
+ Type[] ICSharpInvokeOrInvokeMemberBinder.TypeArguments => Type.EmptyTypes;
CSharpCallFlags ICSharpInvokeOrInvokeMemberBinder.Flags => _flags;
diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpInvokeConstructorBinder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpInvokeConstructorBinder.cs
index 3f991ba9d839c..f4c1d1cacc918 100644
--- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpInvokeConstructorBinder.cs
+++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpInvokeConstructorBinder.cs
@@ -29,7 +29,7 @@ public void PopulateSymbolTableWithName(Type callingType, ArgumentObject[] argum
public bool StaticCall => true;
- public Type[] TypeArguments => Array.Empty();
+ public Type[] TypeArguments => Type.EmptyTypes;
public string Name => ".ctor";
diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinderExtensions.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinderExtensions.cs
index c2e01a3e58d6f..1323e2c24bb29 100644
--- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinderExtensions.cs
+++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinderExtensions.cs
@@ -276,7 +276,7 @@ private static bool IsTypeParameterEquivalentToTypeInst(this Type typeParam, Typ
}
// See if MetadataToken property is available.
- PropertyInfo property = memberInfo.GetProperty("MetadataToken", typeof(int), Array.Empty());
+ PropertyInfo property = memberInfo.GetProperty("MetadataToken", typeof(int), Type.EmptyTypes);
if (property is not null && property.CanRead)
{
diff --git a/src/libraries/Microsoft.CSharp/tests/IntegerBinaryOperationTests.cs b/src/libraries/Microsoft.CSharp/tests/IntegerBinaryOperationTests.cs
index 8888f6ce06723..fe21b494228a2 100644
--- a/src/libraries/Microsoft.CSharp/tests/IntegerBinaryOperationTests.cs
+++ b/src/libraries/Microsoft.CSharp/tests/IntegerBinaryOperationTests.cs
@@ -498,6 +498,7 @@ public void RuntimeExpression(object x, object y, ExpressionType type, object re
[MemberData(nameof(UInt64TestNotEquals))]
[MemberData(nameof(UInt64TestSubtractions))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/26798", TargetFrameworkMonikers.NetFramework)]
+ [SkipOnCoreClr("https://github.com/dotnet/runtime/issues/42719", RuntimeConfiguration.Checked)]
public void ConstantExpressions(object x, object y, ExpressionType type, object result, bool shouldSucceedChecked)
{
var callsite = GetBinaryOperationCallSite(type, false, true, true);
diff --git a/src/libraries/Microsoft.Extensions.Caching.Memory/src/MemoryCache.cs b/src/libraries/Microsoft.Extensions.Caching.Memory/src/MemoryCache.cs
index 55dd1217e65f9..83de60b556abc 100644
--- a/src/libraries/Microsoft.Extensions.Caching.Memory/src/MemoryCache.cs
+++ b/src/libraries/Microsoft.Extensions.Caching.Memory/src/MemoryCache.cs
@@ -4,7 +4,6 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
-using System.Linq;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
@@ -451,35 +450,36 @@ private void Compact(long removalSizeTarget, Func computeEntry
{
RemoveEntry(entry);
}
- }
- /// Policy:
- /// 1. Least recently used objects.
- /// ?. Items with the soonest absolute expiration.
- /// ?. Items with the soonest sliding expiration.
- /// ?. Larger objects - estimated by object graph size, inaccurate.
- private void ExpirePriorityBucket(ref long removedSize, long removalSizeTarget, Func computeEntrySize, List entriesToRemove, List priorityEntries)
- {
- // Do we meet our quota by just removing expired entries?
- if (removalSizeTarget <= removedSize)
+ // Policy:
+ // 1. Least recently used objects.
+ // ?. Items with the soonest absolute expiration.
+ // ?. Items with the soonest sliding expiration.
+ // ?. Larger objects - estimated by object graph size, inaccurate.
+ static void ExpirePriorityBucket(ref long removedSize, long removalSizeTarget, Func computeEntrySize, List entriesToRemove, List priorityEntries)
{
- // No-op, we've met quota
- return;
- }
-
- // Expire enough entries to reach our goal
- // TODO: Refine policy
+ // Do we meet our quota by just removing expired entries?
+ if (removalSizeTarget <= removedSize)
+ {
+ // No-op, we've met quota
+ return;
+ }
- // LRU
- foreach (CacheEntry entry in priorityEntries.OrderBy(entry => entry.LastAccessed))
- {
- entry.SetExpired(EvictionReason.Capacity);
- entriesToRemove.Add(entry);
- removedSize += computeEntrySize(entry);
+ // Expire enough entries to reach our goal
+ // TODO: Refine policy
- if (removalSizeTarget <= removedSize)
+ // LRU
+ priorityEntries.Sort((e1, e2) => e1.LastAccessed.CompareTo(e2.LastAccessed));
+ foreach (CacheEntry entry in priorityEntries)
{
- break;
+ entry.SetExpired(EvictionReason.Capacity);
+ entriesToRemove.Add(entry);
+ removedSize += computeEntrySize(entry);
+
+ if (removalSizeTarget <= removedSize)
+ {
+ break;
+ }
}
}
}
diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/src/ConfigurationBinder.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/src/ConfigurationBinder.cs
index 171a8dfa69de3..4d2e5cf4889a9 100644
--- a/src/libraries/Microsoft.Extensions.Configuration.Binder/src/ConfigurationBinder.cs
+++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/src/ConfigurationBinder.cs
@@ -14,6 +14,8 @@ namespace Microsoft.Extensions.Configuration
///
public static class ConfigurationBinder
{
+ private const BindingFlags DeclaredOnlyLookup = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+
///
/// Attempts to bind the configuration instance to a new instance of type T.
/// If this configuration section has a value, that will be used.
@@ -179,7 +181,7 @@ private static void BindNonScalar(this IConfiguration configuration, object inst
{
if (instance != null)
{
- foreach (PropertyInfo property in GetAllProperties(instance.GetType().GetTypeInfo()))
+ foreach (PropertyInfo property in GetAllProperties(instance.GetType()))
{
BindProperty(property, instance, configuration, options);
}
@@ -214,20 +216,18 @@ private static void BindProperty(PropertyInfo property, object instance, IConfig
}
}
- private static object BindToCollection(TypeInfo typeInfo, IConfiguration config, BinderOptions options)
+ private static object BindToCollection(Type type, IConfiguration config, BinderOptions options)
{
- Type type = typeof(List<>).MakeGenericType(typeInfo.GenericTypeArguments[0]);
- object instance = Activator.CreateInstance(type);
- BindCollection(instance, type, config, options);
+ Type genericType = typeof(List<>).MakeGenericType(type.GenericTypeArguments[0]);
+ object instance = Activator.CreateInstance(genericType);
+ BindCollection(instance, genericType, config, options);
return instance;
}
// Try to create an array/dictionary instance to back various collection interfaces
private static object AttemptBindToCollectionInterfaces(Type type, IConfiguration config, BinderOptions options)
{
- TypeInfo typeInfo = type.GetTypeInfo();
-
- if (!typeInfo.IsInterface)
+ if (!type.IsInterface)
{
return null;
}
@@ -236,13 +236,13 @@ private static object AttemptBindToCollectionInterfaces(Type type, IConfiguratio
if (collectionInterface != null)
{
// IEnumerable is guaranteed to have exactly one parameter
- return BindToCollection(typeInfo, config, options);
+ return BindToCollection(type, config, options);
}
collectionInterface = FindOpenGenericInterface(typeof(IReadOnlyDictionary<,>), type);
if (collectionInterface != null)
{
- Type dictionaryType = typeof(Dictionary<,>).MakeGenericType(typeInfo.GenericTypeArguments[0], typeInfo.GenericTypeArguments[1]);
+ Type dictionaryType = typeof(Dictionary<,>).MakeGenericType(type.GenericTypeArguments[0], type.GenericTypeArguments[1]);
object instance = Activator.CreateInstance(dictionaryType);
BindDictionary(instance, dictionaryType, config, options);
return instance;
@@ -251,7 +251,7 @@ private static object AttemptBindToCollectionInterfaces(Type type, IConfiguratio
collectionInterface = FindOpenGenericInterface(typeof(IDictionary<,>), type);
if (collectionInterface != null)
{
- object instance = Activator.CreateInstance(typeof(Dictionary<,>).MakeGenericType(typeInfo.GenericTypeArguments[0], typeInfo.GenericTypeArguments[1]));
+ object instance = Activator.CreateInstance(typeof(Dictionary<,>).MakeGenericType(type.GenericTypeArguments[0], type.GenericTypeArguments[1]));
BindDictionary(instance, collectionInterface, config, options);
return instance;
}
@@ -260,21 +260,21 @@ private static object AttemptBindToCollectionInterfaces(Type type, IConfiguratio
if (collectionInterface != null)
{
// IReadOnlyCollection is guaranteed to have exactly one parameter
- return BindToCollection(typeInfo, config, options);
+ return BindToCollection(type, config, options);
}
collectionInterface = FindOpenGenericInterface(typeof(ICollection<>), type);
if (collectionInterface != null)
{
// ICollection is guaranteed to have exactly one parameter
- return BindToCollection(typeInfo, config, options);
+ return BindToCollection(type, config, options);
}
collectionInterface = FindOpenGenericInterface(typeof(IEnumerable<>), type);
if (collectionInterface != null)
{
// IEnumerable is guaranteed to have exactly one parameter
- return BindToCollection(typeInfo, config, options);
+ return BindToCollection(type, config, options);
}
return null;
@@ -349,26 +349,24 @@ private static object BindInstance(Type type, object instance, IConfiguration co
private static object CreateInstance(Type type)
{
- TypeInfo typeInfo = type.GetTypeInfo();
-
- if (typeInfo.IsInterface || typeInfo.IsAbstract)
+ if (type.IsInterface || type.IsAbstract)
{
throw new InvalidOperationException(SR.Format(SR.Error_CannotActivateAbstractOrInterface, type));
}
if (type.IsArray)
{
- if (typeInfo.GetArrayRank() > 1)
+ if (type.GetArrayRank() > 1)
{
throw new InvalidOperationException(SR.Format(SR.Error_UnsupportedMultidimensionalArray, type));
}
- return Array.CreateInstance(typeInfo.GetElementType(), 0);
+ return Array.CreateInstance(type.GetElementType(), 0);
}
- if (!typeInfo.IsValueType)
+ if (!type.IsValueType)
{
- bool hasDefaultConstructor = typeInfo.DeclaredConstructors.Any(ctor => ctor.IsPublic && ctor.GetParameters().Length == 0);
+ bool hasDefaultConstructor = type.GetConstructors(DeclaredOnlyLookup).Any(ctor => ctor.IsPublic && ctor.GetParameters().Length == 0);
if (!hasDefaultConstructor)
{
throw new InvalidOperationException(SR.Format(SR.Error_MissingParameterlessConstructor, type));
@@ -387,12 +385,10 @@ private static object CreateInstance(Type type)
private static void BindDictionary(object dictionary, Type dictionaryType, IConfiguration config, BinderOptions options)
{
- TypeInfo typeInfo = dictionaryType.GetTypeInfo();
-
// IDictionary is guaranteed to have exactly two parameters
- Type keyType = typeInfo.GenericTypeArguments[0];
- Type valueType = typeInfo.GenericTypeArguments[1];
- bool keyTypeIsEnum = keyType.GetTypeInfo().IsEnum;
+ Type keyType = dictionaryType.GenericTypeArguments[0];
+ Type valueType = dictionaryType.GenericTypeArguments[1];
+ bool keyTypeIsEnum = keyType.IsEnum;
if (keyType != typeof(string) && !keyTypeIsEnum)
{
@@ -400,7 +396,7 @@ private static void BindDictionary(object dictionary, Type dictionaryType, IConf
return;
}
- PropertyInfo setter = typeInfo.GetDeclaredProperty("Item");
+ PropertyInfo setter = dictionaryType.GetProperty("Item", DeclaredOnlyLookup);
foreach (IConfigurationSection child in config.GetChildren())
{
object item = BindInstance(
@@ -426,11 +422,9 @@ private static void BindDictionary(object dictionary, Type dictionaryType, IConf
private static void BindCollection(object collection, Type collectionType, IConfiguration config, BinderOptions options)
{
- TypeInfo typeInfo = collectionType.GetTypeInfo();
-
// ICollection is guaranteed to have exactly one parameter
- Type itemType = typeInfo.GenericTypeArguments[0];
- MethodInfo addMethod = typeInfo.GetDeclaredMethod("Add");
+ Type itemType = collectionType.GenericTypeArguments[0];
+ MethodInfo addMethod = collectionType.GetMethod("Add", DeclaredOnlyLookup);
foreach (IConfigurationSection section in config.GetChildren())
{
@@ -497,7 +491,7 @@ private static bool TryConvertValue(Type type, string value, string path, out ob
return true;
}
- if (type.GetTypeInfo().IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>))
+ if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>))
{
if (string.IsNullOrEmpty(value))
{
@@ -550,17 +544,16 @@ private static object ConvertValue(Type type, string value, string path)
private static Type FindOpenGenericInterface(Type expected, Type actual)
{
- TypeInfo actualTypeInfo = actual.GetTypeInfo();
- if (actualTypeInfo.IsGenericType &&
+ if (actual.IsGenericType &&
actual.GetGenericTypeDefinition() == expected)
{
return actual;
}
- IEnumerable interfaces = actualTypeInfo.ImplementedInterfaces;
+ Type[] interfaces = actual.GetInterfaces();
foreach (Type interfaceType in interfaces)
{
- if (interfaceType.GetTypeInfo().IsGenericType &&
+ if (interfaceType.IsGenericType &&
interfaceType.GetGenericTypeDefinition() == expected)
{
return interfaceType;
@@ -569,16 +562,16 @@ private static Type FindOpenGenericInterface(Type expected, Type actual)
return null;
}
- private static IEnumerable GetAllProperties(TypeInfo type)
+ private static IEnumerable GetAllProperties(Type type)
{
var allProperties = new List();
do
{
- allProperties.AddRange(type.DeclaredProperties);
- type = type.BaseType.GetTypeInfo();
+ allProperties.AddRange(type.GetProperties(DeclaredOnlyLookup));
+ type = type.BaseType;
}
- while (type != typeof(object).GetTypeInfo());
+ while (type != typeof(object));
return allProperties;
}
diff --git a/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/src/EnvironmentVariablesConfigurationProvider.cs b/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/src/EnvironmentVariablesConfigurationProvider.cs
index 604e544a8ba47..1860699f3bd96 100644
--- a/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/src/EnvironmentVariablesConfigurationProvider.cs
+++ b/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/src/EnvironmentVariablesConfigurationProvider.cs
@@ -4,7 +4,6 @@
using System;
using System.Collections;
using System.Collections.Generic;
-using System.Linq;
namespace Microsoft.Extensions.Configuration.EnvironmentVariables
{
@@ -18,101 +17,83 @@ public class EnvironmentVariablesConfigurationProvider : ConfigurationProvider
private const string SqlServerPrefix = "SQLCONNSTR_";
private const string CustomPrefix = "CUSTOMCONNSTR_";
- private const string ConnStrKeyFormat = "ConnectionStrings:{0}";
- private const string ProviderKeyFormat = "ConnectionStrings:{0}_ProviderName";
-
private readonly string _prefix;
///
/// Initializes a new instance.
///
- public EnvironmentVariablesConfigurationProvider() : this(string.Empty)
- { }
+ public EnvironmentVariablesConfigurationProvider() =>
+ _prefix = string.Empty;
///
/// Initializes a new instance with the specified prefix.
///
/// A prefix used to filter the environment variables.
- public EnvironmentVariablesConfigurationProvider(string prefix)
- {
+ public EnvironmentVariablesConfigurationProvider(string prefix) =>
_prefix = prefix ?? string.Empty;
- }
///
/// Loads the environment variables.
///
- public override void Load()
- {
+ public override void Load() =>
Load(Environment.GetEnvironmentVariables());
- }
internal void Load(IDictionary envVariables)
{
var data = new Dictionary(StringComparer.OrdinalIgnoreCase);
- IEnumerable filteredEnvVariables = envVariables
- .Cast()
- .SelectMany(AzureEnvToAppEnv)
- .Where(entry => ((string)entry.Key).StartsWith(_prefix, StringComparison.OrdinalIgnoreCase));
-
- foreach (DictionaryEntry envVariable in filteredEnvVariables)
+ foreach (DictionaryEntry entry in envVariables)
{
- string key = ((string)envVariable.Key).Substring(_prefix.Length);
- data[key] = (string)envVariable.Value;
+ string key = (string)entry.Key;
+ string provider = null;
+ string prefix;
+
+ if (key.StartsWith(MySqlServerPrefix, StringComparison.OrdinalIgnoreCase))
+ {
+ prefix = MySqlServerPrefix;
+ provider = "MySql.Data.MySqlClient";
+ }
+ else if (key.StartsWith(SqlAzureServerPrefix, StringComparison.OrdinalIgnoreCase))
+ {
+ prefix = SqlAzureServerPrefix;
+ provider = "System.Data.SqlClient";
+ }
+ else if (key.StartsWith(SqlServerPrefix, StringComparison.OrdinalIgnoreCase))
+ {
+ prefix = SqlServerPrefix;
+ provider = "System.Data.SqlClient";
+ }
+ else if (key.StartsWith(CustomPrefix, StringComparison.OrdinalIgnoreCase))
+ {
+ prefix = CustomPrefix;
+ }
+ else
+ {
+ AddIfPrefixed(data, NormalizeKey(key), (string)entry.Value);
+ continue;
+ }
+
+ // Add the key-value pair for connection string, and optionally provider name
+ key = NormalizeKey(key.Substring(prefix.Length));
+ AddIfPrefixed(data, $"ConnectionStrings:{key}", (string)entry.Value);
+ if (provider != null)
+ {
+ AddIfPrefixed(data, $"ConnectionStrings:{key}_ProviderName", provider);
+ }
}
Data = data;
}
- private static string NormalizeKey(string key)
+ private void AddIfPrefixed(Dictionary data, string key, string value)
{
- return key.Replace("__", ConfigurationPath.KeyDelimiter);
- }
-
- private static IEnumerable AzureEnvToAppEnv(DictionaryEntry entry)
- {
- string key = (string)entry.Key;
- string prefix = string.Empty;
- string provider = string.Empty;
-
- if (key.StartsWith(MySqlServerPrefix, StringComparison.OrdinalIgnoreCase))
- {
- prefix = MySqlServerPrefix;
- provider = "MySql.Data.MySqlClient";
- }
- else if (key.StartsWith(SqlAzureServerPrefix, StringComparison.OrdinalIgnoreCase))
+ if (key.StartsWith(_prefix, StringComparison.OrdinalIgnoreCase))
{
- prefix = SqlAzureServerPrefix;
- provider = "System.Data.SqlClient";
- }
- else if (key.StartsWith(SqlServerPrefix, StringComparison.OrdinalIgnoreCase))
- {
- prefix = SqlServerPrefix;
- provider = "System.Data.SqlClient";
- }
- else if (key.StartsWith(CustomPrefix, StringComparison.OrdinalIgnoreCase))
- {
- prefix = CustomPrefix;
- }
- else
- {
- entry.Key = NormalizeKey(key);
- yield return entry;
- yield break;
- }
-
- // Return the key-value pair for connection string
- yield return new DictionaryEntry(
- string.Format(ConnStrKeyFormat, NormalizeKey(key.Substring(prefix.Length))),
- entry.Value);
-
- if (!string.IsNullOrEmpty(provider))
- {
- // Return the key-value pair for provider name
- yield return new DictionaryEntry(
- string.Format(ProviderKeyFormat, NormalizeKey(key.Substring(prefix.Length))),
- provider);
+ key = key.Substring(_prefix.Length);
+ data[key] = value;
}
}
+
+ private static string NormalizeKey(string key) => key.Replace("__", ConfigurationPath.KeyDelimiter);
}
}
diff --git a/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/src/UserSecretsConfigurationExtensions.cs b/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/src/UserSecretsConfigurationExtensions.cs
index 0da3963fe2aad..86139faf9b021 100644
--- a/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/src/UserSecretsConfigurationExtensions.cs
+++ b/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/src/UserSecretsConfigurationExtensions.cs
@@ -29,7 +29,7 @@ public static class UserSecretsConfigurationExtensions
/// The configuration builder.
public static IConfigurationBuilder AddUserSecrets(this IConfigurationBuilder configuration)
where T : class
- => configuration.AddUserSecrets(typeof(T).GetTypeInfo().Assembly, optional: false, reloadOnChange: false);
+ => configuration.AddUserSecrets(typeof(T).Assembly, optional: false, reloadOnChange: false);
///
///
@@ -47,7 +47,7 @@ public static IConfigurationBuilder AddUserSecrets(this IConfigurationBuilder
/// The configuration builder.
public static IConfigurationBuilder AddUserSecrets(this IConfigurationBuilder configuration, bool optional)
where T : class
- => configuration.AddUserSecrets(typeof(T).GetTypeInfo().Assembly, optional, reloadOnChange: false);
+ => configuration.AddUserSecrets(typeof(T).Assembly, optional, reloadOnChange: false);
///
///
@@ -66,7 +66,7 @@ public static IConfigurationBuilder AddUserSecrets(this IConfigurationBuilder
/// The configuration builder.
public static IConfigurationBuilder AddUserSecrets(this IConfigurationBuilder configuration, bool optional, bool reloadOnChange)
where T : class
- => configuration.AddUserSecrets(typeof(T).GetTypeInfo().Assembly, optional, reloadOnChange);
+ => configuration.AddUserSecrets(typeof(T).Assembly, optional, reloadOnChange);
///
///
@@ -131,7 +131,7 @@ public static IConfigurationBuilder AddUserSecrets(this IConfigurationBuilder co
UserSecretsIdAttribute attribute = assembly.GetCustomAttribute();
if (attribute != null)
{
- return AddUserSecrets(configuration, attribute.UserSecretsId, reloadOnChange);
+ return AddUserSecretsInternal(configuration, attribute.UserSecretsId, optional, reloadOnChange);
}
if (!optional)
@@ -169,6 +169,9 @@ public static IConfigurationBuilder AddUserSecrets(this IConfigurationBuilder co
/// Whether the configuration should be reloaded if the file changes.
/// The configuration builder.
public static IConfigurationBuilder AddUserSecrets(this IConfigurationBuilder configuration, string userSecretsId, bool reloadOnChange)
+ => AddUserSecretsInternal(configuration, userSecretsId, true, reloadOnChange);
+
+ private static IConfigurationBuilder AddUserSecretsInternal(IConfigurationBuilder configuration, string userSecretsId, bool optional, bool reloadOnChange)
{
if (configuration == null)
{
@@ -180,16 +183,16 @@ public static IConfigurationBuilder AddUserSecrets(this IConfigurationBuilder co
throw new ArgumentNullException(nameof(userSecretsId));
}
- return AddSecretsFile(configuration, PathHelper.GetSecretsPathFromSecretsId(userSecretsId), reloadOnChange);
+ return AddSecretsFile(configuration, PathHelper.GetSecretsPathFromSecretsId(userSecretsId), optional, reloadOnChange);
}
- private static IConfigurationBuilder AddSecretsFile(IConfigurationBuilder configuration, string secretPath, bool reloadOnChange)
+ private static IConfigurationBuilder AddSecretsFile(IConfigurationBuilder configuration, string secretPath, bool optional, bool reloadOnChange)
{
string directoryPath = Path.GetDirectoryName(secretPath);
PhysicalFileProvider fileProvider = Directory.Exists(directoryPath)
? new PhysicalFileProvider(directoryPath)
: null;
- return configuration.AddJsonFile(fileProvider, PathHelper.SecretsFileName, optional: true, reloadOnChange);
+ return configuration.AddJsonFile(fileProvider, PathHelper.SecretsFileName, optional, reloadOnChange);
}
}
}
diff --git a/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/tests/ConfigurationExtensionTest.cs b/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/tests/ConfigurationExtensionTest.cs
index 6f59604a79e19..7859e9f01f5fa 100644
--- a/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/tests/ConfigurationExtensionTest.cs
+++ b/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/tests/ConfigurationExtensionTest.cs
@@ -60,7 +60,7 @@ public void AddUserSecrets_FindsAssemblyAttribute()
SetSecret(TestSecretsId, configKey, randValue);
var config = new ConfigurationBuilder()
- .AddUserSecrets(typeof(ConfigurationExtensionTest).GetTypeInfo().Assembly)
+ .AddUserSecrets(typeof(ConfigurationExtensionTest).Assembly)
.Build();
Assert.Equal(randValue, config[configKey]);
@@ -86,12 +86,12 @@ public void AddUserSecrets_ThrowsIfAssemblyAttributeFromType()
{
var ex = Assert.Throws(() =>
new ConfigurationBuilder().AddUserSecrets());
- Assert.Equal(SR.Format(SR.Error_Missing_UserSecretsIdAttribute, typeof(string).GetTypeInfo().Assembly.GetName().Name),
+ Assert.Equal(SR.Format(SR.Error_Missing_UserSecretsIdAttribute, typeof(string).Assembly.GetName().Name),
ex.Message);
ex = Assert.Throws(() =>
new ConfigurationBuilder().AddUserSecrets(typeof(JObject).Assembly));
- Assert.Equal(SR.Format(SR.Error_Missing_UserSecretsIdAttribute, typeof(JObject).GetTypeInfo().Assembly.GetName().Name),
+ Assert.Equal(SR.Format(SR.Error_Missing_UserSecretsIdAttribute, typeof(JObject).Assembly.GetName().Name),
ex.Message);
}
@@ -107,6 +107,19 @@ public void AddUserSecrets_DoesNotThrowsIfOptional()
Assert.Empty(config.AsEnumerable());
}
+ [Fact]
+ public void AddUserSecrets_DoesThrowsIfNotOptionalAndSecretDoesNotExist()
+ {
+ var secretId = Assembly.GetExecutingAssembly().GetName().Name;
+ var secretPath = PathHelper.GetSecretsPathFromSecretsId(secretId);
+ if (File.Exists(secretPath))
+ {
+ File.Delete(secretPath);
+ }
+
+ Assert.Throws(() => new ConfigurationBuilder().AddUserSecrets(Assembly.GetExecutingAssembly(), false).Build());
+ }
+
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/34580", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)]
public void AddUserSecrets_With_SecretsId_Passed_Explicitly()
diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/Extensions/ServiceCollectionDescriptorExtensions.cs b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/Extensions/ServiceCollectionDescriptorExtensions.cs
index b1d8704fe0cba..e4cfae88c17e0 100644
--- a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/Extensions/ServiceCollectionDescriptorExtensions.cs
+++ b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/Extensions/ServiceCollectionDescriptorExtensions.cs
@@ -4,7 +4,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
-using System.Linq;
namespace Microsoft.Extensions.DependencyInjection.Extensions
{
@@ -85,10 +84,17 @@ public static void TryAdd(
throw new ArgumentNullException(nameof(descriptor));
}
- if (!collection.Any(d => d.ServiceType == descriptor.ServiceType))
+ int count = collection.Count;
+ for (int i = 0; i < count; i++)
{
- collection.Add(descriptor);
+ if (collection[i].ServiceType == descriptor.ServiceType)
+ {
+ // Already added
+ return;
+ }
}
+
+ collection.Add(descriptor);
}
///
@@ -608,12 +614,19 @@ public static void TryAddEnumerable(
nameof(descriptor));
}
- if (!services.Any(d =>
- d.ServiceType == descriptor.ServiceType &&
- d.GetImplementationType() == implementationType))
+ int count = services.Count;
+ for (int i = 0; i < count; i++)
{
- services.Add(descriptor);
+ ServiceDescriptor service = services[i];
+ if (service.ServiceType == descriptor.ServiceType &&
+ service.GetImplementationType() == implementationType)
+ {
+ // Already added
+ return;
+ }
}
+
+ services.Add(descriptor);
}
///
@@ -674,10 +687,15 @@ public static IServiceCollection Replace(
throw new ArgumentNullException(nameof(descriptor));
}
- ServiceDescriptor? registeredServiceDescriptor = collection.FirstOrDefault(s => s.ServiceType == descriptor.ServiceType);
- if (registeredServiceDescriptor != null)
+ // Remove existing
+ int count = collection.Count;
+ for (int i = 0; i < count; i++)
{
- collection.Remove(registeredServiceDescriptor);
+ if (collection[i].ServiceType == descriptor.ServiceType)
+ {
+ collection.RemoveAt(i);
+ break;
+ }
}
collection.Add(descriptor);
diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteFactory.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteFactory.cs
index f9e7e42036ba5..a73b14a5ab720 100644
--- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteFactory.cs
+++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteFactory.cs
@@ -15,7 +15,7 @@ namespace Microsoft.Extensions.DependencyInjection.ServiceLookup
internal class CallSiteFactory
{
private const int DefaultSlot = 0;
- private readonly List _descriptors;
+ private readonly ServiceDescriptor[] _descriptors;
private readonly ConcurrentDictionary _callSiteCache = new ConcurrentDictionary();
private readonly Dictionary _descriptorLookup = new Dictionary();
@@ -24,7 +24,7 @@ internal class CallSiteFactory
public CallSiteFactory(IEnumerable descriptors)
{
_stackGuard = new StackGuard();
- _descriptors = descriptors.ToList();
+ _descriptors = descriptors.ToArray();
Populate();
}
@@ -32,19 +32,19 @@ private void Populate()
{
foreach (ServiceDescriptor descriptor in _descriptors)
{
- TypeInfo serviceTypeInfo = descriptor.ServiceType.GetTypeInfo();
- if (serviceTypeInfo.IsGenericTypeDefinition)
+ Type serviceType = descriptor.ServiceType;
+ if (serviceType.IsGenericTypeDefinition)
{
- TypeInfo implementationTypeInfo = descriptor.ImplementationType?.GetTypeInfo();
+ Type implementationType = descriptor.ImplementationType;
- if (implementationTypeInfo == null || !implementationTypeInfo.IsGenericTypeDefinition)
+ if (implementationType == null || !implementationType.IsGenericTypeDefinition)
{
throw new ArgumentException(
SR.Format(SR.OpenGenericServiceRequiresOpenGenericImplementation, descriptor.ServiceType),
"descriptors");
}
- if (implementationTypeInfo.IsAbstract || implementationTypeInfo.IsInterface)
+ if (implementationType.IsAbstract || implementationType.IsInterface)
{
throw new ArgumentException(
SR.Format(SR.TypeCannotBeActivated, descriptor.ImplementationType, descriptor.ServiceType));
@@ -53,11 +53,11 @@ private void Populate()
else if (descriptor.ImplementationInstance == null && descriptor.ImplementationFactory == null)
{
Debug.Assert(descriptor.ImplementationType != null);
- TypeInfo implementationTypeInfo = descriptor.ImplementationType.GetTypeInfo();
+ Type implementationType = descriptor.ImplementationType;
- if (implementationTypeInfo.IsGenericTypeDefinition ||
- implementationTypeInfo.IsAbstract ||
- implementationTypeInfo.IsInterface)
+ if (implementationType.IsGenericTypeDefinition ||
+ implementationType.IsAbstract ||
+ implementationType.IsInterface)
{
throw new ArgumentException(
SR.Format(SR.TypeCannotBeActivated, descriptor.ImplementationType, descriptor.ServiceType));
@@ -160,7 +160,7 @@ private ServiceCallSite TryCreateEnumerable(Type serviceType, CallSiteChain call
{
int slot = 0;
// We are going in reverse so the last service in descriptor list gets slot 0
- for (int i = _descriptors.Count - 1; i >= 0; i--)
+ for (int i = _descriptors.Length - 1; i >= 0; i--)
{
ServiceDescriptor descriptor = _descriptors[i];
ServiceCallSite callSite = TryCreateExact(descriptor, itemType, callSiteChain, slot) ??
diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/Expressions/ExpressionResolverBuilder.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/Expressions/ExpressionResolverBuilder.cs
index 1453db2122796..e73710776e6b0 100644
--- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/Expressions/ExpressionResolverBuilder.cs
+++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/Expressions/ExpressionResolverBuilder.cs
@@ -193,7 +193,7 @@ protected override Expression VisitConstructor(ConstructorCallSite callSite, obj
private static Expression Convert(Expression expression, Type type, bool forceValueTypeConversion = false)
{
// Don't convert if the expression is already assignable
- if (type.GetTypeInfo().IsAssignableFrom(expression.Type.GetTypeInfo())
+ if (type.IsAssignableFrom(expression.Type)
&& (!expression.Type.GetTypeInfo().IsValueType || !forceValueTypeConversion))
{
return expression;
diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ILEmit/ILEmitResolverBuilder.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ILEmit/ILEmitResolverBuilder.cs
index e053565832f9e..41370e45aeefa 100644
--- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ILEmit/ILEmitResolverBuilder.cs
+++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ILEmit/ILEmitResolverBuilder.cs
@@ -4,7 +4,6 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
-using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
@@ -19,7 +18,7 @@ internal sealed class ILEmitResolverBuilder : CallSiteVisitor());
+ ObjectFactory factory = ActivatorUtilities.CreateFactory(typeof(ServiceA), Type.EmptyTypes);
ServiceA serviceA = factory(provider, null) as ServiceA;
ServiceB serviceB = ActivatorUtilities.CreateInstance(provider, typeof(ServiceB)) as ServiceB;
ServiceC serviceC = ActivatorUtilities.CreateInstance(provider);
diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/CollectionExtensions.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/CollectionExtensions.cs
index a3ad8264a7548..9804f4a85ae8f 100644
--- a/src/libraries/Microsoft.Extensions.DependencyModel/src/CollectionExtensions.cs
+++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/CollectionExtensions.cs
@@ -9,6 +9,7 @@ namespace System.Collections.Generic
public static class CollectionExtensions
{
public static RuntimeAssetGroup GetDefaultGroup(this IEnumerable self) => GetGroup(self, string.Empty);
+
public static RuntimeAssetGroup GetRuntimeGroup(this IEnumerable self, string runtime)
{
if (string.IsNullOrEmpty(runtime))
@@ -35,9 +36,16 @@ public static IEnumerable GetRuntimeAssets(this IEnumerable GetAssets(IEnumerable groups, string runtime)
{
- return groups
- .Where(a => string.Equals(a.Runtime, runtime, StringComparison.Ordinal))
- .SelectMany(a => a.AssetPaths);
+ foreach (RuntimeAssetGroup group in groups)
+ {
+ if (group.Runtime == runtime)
+ {
+ foreach (string path in group.AssetPaths)
+ {
+ yield return path;
+ }
+ }
+ }
}
public static IEnumerable GetDefaultRuntimeFileAssets(this IEnumerable self) => GetRuntimeFiles(self, string.Empty);
@@ -52,9 +60,16 @@ public static IEnumerable GetRuntimeFileAssets(this IEnumerable GetRuntimeFiles(IEnumerable groups, string runtime)
{
- return groups
- .Where(a => string.Equals(a.Runtime, runtime, StringComparison.Ordinal))
- .SelectMany(a => a.RuntimeFiles);
+ foreach (RuntimeAssetGroup group in groups)
+ {
+ if (group.Runtime == runtime)
+ {
+ foreach (RuntimeFile file in group.RuntimeFiles)
+ {
+ yield return file;
+ }
+ }
+ }
}
}
}
diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/FileSystemOperationRecorder.cs b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/FileSystemOperationRecorder.cs
index c3c7781d5c772..cef2ebba1c6c5 100644
--- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/FileSystemOperationRecorder.cs
+++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/tests/TestUtility/FileSystemOperationRecorder.cs
@@ -8,6 +8,8 @@ namespace Microsoft.Extensions.FileSystemGlobbing.Tests.TestUtility
{
internal class FileSystemOperationRecorder
{
+ private const BindingFlags DeclaredOnlyLookup = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+
public IList> Records = new List>();
public void Add(string action, object values)
@@ -17,7 +19,7 @@ public void Add(string action, object values)
{"action", action }
};
- foreach (var p in values.GetType().GetTypeInfo().DeclaredProperties)
+ foreach (var p in values.GetType().GetProperties(DeclaredOnlyLookup))
{
record[p.Name] = p.GetValue(values);
}
diff --git a/src/libraries/Microsoft.Extensions.HostFactoryResolver/src/HostFactoryResolver.cs b/src/libraries/Microsoft.Extensions.HostFactoryResolver/src/HostFactoryResolver.cs
index f70dc1a72b14f..bb095c34ec1ff 100644
--- a/src/libraries/Microsoft.Extensions.HostFactoryResolver/src/HostFactoryResolver.cs
+++ b/src/libraries/Microsoft.Extensions.HostFactoryResolver/src/HostFactoryResolver.cs
@@ -8,6 +8,8 @@ namespace Microsoft.Extensions.Hosting
{
internal class HostFactoryResolver
{
+ private const BindingFlags DeclaredOnlyLookup = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+
public static readonly string BuildWebHost = nameof(BuildWebHost);
public static readonly string CreateWebHostBuilder = nameof(CreateWebHostBuilder);
public static readonly string CreateHostBuilder = nameof(CreateHostBuilder);
@@ -35,7 +37,7 @@ private static Func ResolveFactory(Assembly assembly, string nam
return null;
}
- var factory = programType.GetTypeInfo().GetDeclaredMethod(name);
+ var factory = programType.GetMethod(name, DeclaredOnlyLookup);
if (!IsFactory(factory))
{
return null;
@@ -105,7 +107,7 @@ private static IServiceProvider GetServiceProvider(object host)
return null;
}
var hostType = host.GetType();
- var servicesProperty = hostType.GetTypeInfo().GetDeclaredProperty("Services");
+ var servicesProperty = hostType.GetProperty("Services", DeclaredOnlyLookup);
return (IServiceProvider)servicesProperty.GetValue(host);
}
}
diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Internal/HostTests.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Internal/HostTests.cs
index 80653a63533f3..f7ce5afc57ca7 100644
--- a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Internal/HostTests.cs
+++ b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Internal/HostTests.cs
@@ -1227,6 +1227,7 @@ public void ThrowExceptionForCustomImplementationOfIHostApplicationLifetime()
public async Task BackgroundServiceAsyncExceptionGetsLogged()
{
using TestEventListener listener = new TestEventListener();
+ var backgroundDelayTaskSource = new TaskCompletionSource();
using IHost host = CreateBuilder()
.ConfigureLogging(logging =>
@@ -1235,10 +1236,12 @@ public async Task BackgroundServiceAsyncExceptionGetsLogged()
})
.ConfigureServices((hostContext, services) =>
{
- services.AddHostedService();
+ services.AddHostedService(sp => new AsyncThrowingService(backgroundDelayTaskSource.Task));
})
.Start();
+ backgroundDelayTaskSource.SetResult(true);
+
// give the background service 1 minute to log the failure
TimeSpan timeout = TimeSpan.FromMinutes(1);
Stopwatch sw = Stopwatch.StartNew();
@@ -1370,9 +1373,16 @@ public ValueTask DisposeAsync()
private class AsyncThrowingService : BackgroundService
{
+ private readonly Task _executeDelayTask;
+
+ public AsyncThrowingService(Task executeDelayTask)
+ {
+ _executeDelayTask = executeDelayTask;
+ }
+
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
- await Task.Yield();
+ await _executeDelayTask;
throw new Exception("Background Exception");
}
diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/ref/Microsoft.Extensions.Logging.Console.cs b/src/libraries/Microsoft.Extensions.Logging.Console/ref/Microsoft.Extensions.Logging.Console.cs
index 80e365a657530..4cca93a0012af 100644
--- a/src/libraries/Microsoft.Extensions.Logging.Console/ref/Microsoft.Extensions.Logging.Console.cs
+++ b/src/libraries/Microsoft.Extensions.Logging.Console/ref/Microsoft.Extensions.Logging.Console.cs
@@ -6,6 +6,7 @@
namespace Microsoft.Extensions.Logging
{
+ [System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static partial class ConsoleLoggerExtensions
{
public static Microsoft.Extensions.Logging.ILoggingBuilder AddConsole(this Microsoft.Extensions.Logging.ILoggingBuilder builder) { throw null; }
@@ -63,6 +64,7 @@ public ConsoleLoggerOptions() { }
[System.ObsoleteAttribute("ConsoleLoggerOptions.UseUtcTimestamp has been deprecated. Please use ConsoleFormatterOptions.UseUtcTimestamp instead.", false)]
public bool UseUtcTimestamp { get { throw null; } set { } }
}
+ [System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[Microsoft.Extensions.Logging.ProviderAliasAttribute("Console")]
public partial class ConsoleLoggerProvider : Microsoft.Extensions.Logging.ILoggerProvider, Microsoft.Extensions.Logging.ISupportExternalScope, System.IDisposable
{
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 048eb0459608a..41c181ec7a7d0 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,6 +1,7 @@
netstandard2.0;net461
+ true
diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/src/AnsiParsingLogConsole.cs b/src/libraries/Microsoft.Extensions.Logging.Console/src/AnsiParsingLogConsole.cs
index 9f42ec6302932..6a4473289b287 100644
--- a/src/libraries/Microsoft.Extensions.Logging.Console/src/AnsiParsingLogConsole.cs
+++ b/src/libraries/Microsoft.Extensions.Logging.Console/src/AnsiParsingLogConsole.cs
@@ -3,9 +3,11 @@
using System;
using System.IO;
+using System.Runtime.Versioning;
namespace Microsoft.Extensions.Logging.Console
{
+ [UnsupportedOSPlatform("browser")]
internal class AnsiParsingLogConsole : IConsole
{
private readonly TextWriter _textWriter;
diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/src/ConsoleLogger.cs b/src/libraries/Microsoft.Extensions.Logging.Console/src/ConsoleLogger.cs
index 1d544f3228109..daa903da318b0 100644
--- a/src/libraries/Microsoft.Extensions.Logging.Console/src/ConsoleLogger.cs
+++ b/src/libraries/Microsoft.Extensions.Logging.Console/src/ConsoleLogger.cs
@@ -3,10 +3,12 @@
using System;
using System.IO;
+using System.Runtime.Versioning;
using Microsoft.Extensions.Logging.Abstractions;
namespace Microsoft.Extensions.Logging.Console
{
+ [UnsupportedOSPlatform("browser")]
internal class ConsoleLogger : ILogger
{
private readonly string _name;
diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/src/ConsoleLoggerExtensions.cs b/src/libraries/Microsoft.Extensions.Logging.Console/src/ConsoleLoggerExtensions.cs
index 8cd8a594e359b..9d12ac5e111f4 100644
--- a/src/libraries/Microsoft.Extensions.Logging.Console/src/ConsoleLoggerExtensions.cs
+++ b/src/libraries/Microsoft.Extensions.Logging.Console/src/ConsoleLoggerExtensions.cs
@@ -3,6 +3,7 @@
using System;
using System.Diagnostics.CodeAnalysis;
+using System.Runtime.Versioning;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
@@ -12,6 +13,7 @@
namespace Microsoft.Extensions.Logging
{
+ [UnsupportedOSPlatform("browser")]
public static class ConsoleLoggerExtensions
{
///
@@ -154,6 +156,7 @@ private static ILoggingBuilder AddFormatterWithName(this ILoggingBuilder builder
}
}
+ [UnsupportedOSPlatform("browser")]
internal class ConsoleLoggerFormatterConfigureOptions : ConfigureFromConfigurationOptions
where TOptions : ConsoleFormatterOptions
where TFormatter : ConsoleFormatter
@@ -164,6 +167,7 @@ public ConsoleLoggerFormatterConfigureOptions(ILoggerProviderConfiguration : ConfigurationChangeTokenSource
where TOptions : ConsoleFormatterOptions
where TFormatter : ConsoleFormatter
diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/src/ConsoleLoggerProcessor.cs b/src/libraries/Microsoft.Extensions.Logging.Console/src/ConsoleLoggerProcessor.cs
index 83a49c20d4c89..c79ccac72f9fd 100644
--- a/src/libraries/Microsoft.Extensions.Logging.Console/src/ConsoleLoggerProcessor.cs
+++ b/src/libraries/Microsoft.Extensions.Logging.Console/src/ConsoleLoggerProcessor.cs
@@ -3,10 +3,12 @@
using System;
using System.Collections.Concurrent;
+using System.Runtime.Versioning;
using System.Threading;
namespace Microsoft.Extensions.Logging.Console
{
+ [UnsupportedOSPlatform("browser")]
internal class ConsoleLoggerProcessor : IDisposable
{
private const int _maxQueuedMessages = 1024;
diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/src/ConsoleLoggerProvider.cs b/src/libraries/Microsoft.Extensions.Logging.Console/src/ConsoleLoggerProvider.cs
index d5a22520a1e29..fd995f7cd6b96 100644
--- a/src/libraries/Microsoft.Extensions.Logging.Console/src/ConsoleLoggerProvider.cs
+++ b/src/libraries/Microsoft.Extensions.Logging.Console/src/ConsoleLoggerProvider.cs
@@ -4,8 +4,8 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
-using System.Linq;
using System.Runtime.InteropServices;
+using System.Runtime.Versioning;
using Microsoft.Extensions.Options;
namespace Microsoft.Extensions.Logging.Console
@@ -13,6 +13,7 @@ namespace Microsoft.Extensions.Logging.Console
///
/// A provider of instances.
///
+ [UnsupportedOSPlatform("browser")]
[ProviderAlias("Console")]
public class ConsoleLoggerProvider : ILoggerProvider, ISupportExternalScope
{
@@ -29,7 +30,7 @@ public class ConsoleLoggerProvider : ILoggerProvider, ISupportExternalScope
///
/// The options to create instances with.
public ConsoleLoggerProvider(IOptionsMonitor options)
- : this(options, Enumerable.Empty()) { }
+ : this(options, Array.Empty()) { }
///
/// Creates an instance of .
@@ -76,23 +77,26 @@ private static bool DoesConsoleSupportAnsi()
private void SetFormatters(IEnumerable formatters = null)
{
- _formatters = new ConcurrentDictionary(StringComparer.OrdinalIgnoreCase);
- if (formatters == null || !formatters.Any())
- {
- var defaultMonitor = new FormatterOptionsMonitor(new SimpleConsoleFormatterOptions());
- var systemdMonitor = new FormatterOptionsMonitor(new ConsoleFormatterOptions());
- var jsonMonitor = new FormatterOptionsMonitor(new JsonConsoleFormatterOptions());
- _formatters.GetOrAdd(ConsoleFormatterNames.Simple, formatterName => new SimpleConsoleFormatter(defaultMonitor));
- _formatters.GetOrAdd(ConsoleFormatterNames.Systemd, formatterName => new SystemdConsoleFormatter(systemdMonitor));
- _formatters.GetOrAdd(ConsoleFormatterNames.Json, formatterName => new JsonConsoleFormatter(jsonMonitor));
- }
- else
+ var cd = new ConcurrentDictionary(StringComparer.OrdinalIgnoreCase);
+
+ bool added = false;
+ if (formatters != null)
{
foreach (ConsoleFormatter formatter in formatters)
{
- _formatters.GetOrAdd(formatter.Name, formatterName => formatter);
+ cd.TryAdd(formatter.Name, formatter);
+ added = true;
}
}
+
+ if (!added)
+ {
+ cd.TryAdd(ConsoleFormatterNames.Simple, new SimpleConsoleFormatter(new FormatterOptionsMonitor(new SimpleConsoleFormatterOptions())));
+ cd.TryAdd(ConsoleFormatterNames.Systemd, new SystemdConsoleFormatter(new FormatterOptionsMonitor(new ConsoleFormatterOptions())));
+ cd.TryAdd(ConsoleFormatterNames.Json, new JsonConsoleFormatter(new FormatterOptionsMonitor(new JsonConsoleFormatterOptions())));
+ }
+
+ _formatters = cd;
}
// warning: ReloadLoggerOptions can be called before the ctor completed,... before registering all of the state used in this method need to be initialized
@@ -135,7 +139,7 @@ public ILogger CreateLogger(string name)
{
UpdateFormatterOptions(logFormatter, _options.CurrentValue);
}
-#pragma warning disable CS0618
+#pragma warning restore CS0618
}
return _loggers.GetOrAdd(name, loggerName => new ConsoleLogger(name, _messageQueue)
diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/src/JsonConsoleFormatter.cs b/src/libraries/Microsoft.Extensions.Logging.Console/src/JsonConsoleFormatter.cs
index 41cd6e32336f0..c08038c5df9aa 100644
--- a/src/libraries/Microsoft.Extensions.Logging.Console/src/JsonConsoleFormatter.cs
+++ b/src/libraries/Microsoft.Extensions.Logging.Console/src/JsonConsoleFormatter.cs
@@ -2,16 +2,12 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System;
-using System.Buffers;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
-using System.Linq;
-using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using System.Text.Json;
-using System.Text.Json.Serialization;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Options;
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 1e8e0f43fa4b7..ef573cddb9a39 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
@@ -1,4 +1,4 @@
-
+
$(NetCoreAppCurrent);netcoreapp3.0;netstandard2.0;net461
@@ -8,6 +8,7 @@
$(DefineConstants);NO_SUPPRESS_GC_TRANSITION
false
+ true
diff --git a/src/libraries/Microsoft.Extensions.Logging/src/LoggerFactory.cs b/src/libraries/Microsoft.Extensions.Logging/src/LoggerFactory.cs
index 86615b4db06c1..3ee0e0f07f1d8 100644
--- a/src/libraries/Microsoft.Extensions.Logging/src/LoggerFactory.cs
+++ b/src/libraries/Microsoft.Extensions.Logging/src/LoggerFactory.cs
@@ -3,7 +3,6 @@
using System;
using System.Collections.Generic;
-using System.Linq;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
@@ -28,7 +27,7 @@ public class LoggerFactory : ILoggerFactory
///
/// Creates a new instance.
///
- public LoggerFactory() : this(Enumerable.Empty())
+ public LoggerFactory() : this(Array.Empty())
{
}
diff --git a/src/libraries/Microsoft.Extensions.Logging/src/LoggerRuleSelector.cs b/src/libraries/Microsoft.Extensions.Logging/src/LoggerRuleSelector.cs
index 1f3aa5240668e..7ebce26bbfc35 100644
--- a/src/libraries/Microsoft.Extensions.Logging/src/LoggerRuleSelector.cs
+++ b/src/libraries/Microsoft.Extensions.Logging/src/LoggerRuleSelector.cs
@@ -7,8 +7,6 @@ namespace Microsoft.Extensions.Logging
{
internal class LoggerRuleSelector
{
- private static readonly char[] WildcardChar = { '*' };
-
public void Select(LoggerFilterOptions options, Type providerType, string category, out LogLevel? minLevel, out Func filter)
{
filter = null;
@@ -40,7 +38,6 @@ public void Select(LoggerFilterOptions options, Type providerType, string catego
}
}
-
private static bool IsBetter(LoggerFilterRule rule, LoggerFilterRule current, string logger, string category)
{
// Skip rules with inapplicable type or category
@@ -49,19 +46,32 @@ private static bool IsBetter(LoggerFilterRule rule, LoggerFilterRule current, st
return false;
}
- if (rule.CategoryName != null)
+ string categoryName = rule.CategoryName;
+ if (categoryName != null)
{
- string[] categoryParts = rule.CategoryName.Split(WildcardChar);
- if (categoryParts.Length > 2)
+ const char WildcardChar = '*';
+
+ int wildcardIndex = categoryName.IndexOf(WildcardChar);
+ if (wildcardIndex != -1 &&
+ categoryName.IndexOf(WildcardChar, wildcardIndex + 1) != -1)
{
throw new InvalidOperationException("Only one wildcard character is allowed in category name.");
}
- string prefix = categoryParts[0];
- string suffix = categoryParts.Length > 1 ? categoryParts[1] : string.Empty;
+ ReadOnlySpan prefix, suffix;
+ if (wildcardIndex == -1)
+ {
+ prefix = categoryName.AsSpan();
+ suffix = default;
+ }
+ else
+ {
+ prefix = categoryName.AsSpan(0, wildcardIndex);
+ suffix = categoryName.AsSpan(wildcardIndex + 1);
+ }
- if (!category.StartsWith(prefix, StringComparison.OrdinalIgnoreCase) ||
- !category.EndsWith(suffix, StringComparison.OrdinalIgnoreCase))
+ if (!category.AsSpan().StartsWith(prefix, StringComparison.OrdinalIgnoreCase) ||
+ !category.AsSpan().EndsWith(suffix, StringComparison.OrdinalIgnoreCase))
{
return false;
}
diff --git a/src/libraries/Microsoft.Extensions.Options.DataAnnotations/src/DataAnnotationValidateOptions.cs b/src/libraries/Microsoft.Extensions.Options.DataAnnotations/src/DataAnnotationValidateOptions.cs
index 2b905258fa787..5b6988ca69311 100644
--- a/src/libraries/Microsoft.Extensions.Options.DataAnnotations/src/DataAnnotationValidateOptions.cs
+++ b/src/libraries/Microsoft.Extensions.Options.DataAnnotations/src/DataAnnotationValidateOptions.cs
@@ -1,10 +1,8 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
-using System.Linq;
namespace Microsoft.Extensions.Options
{
diff --git a/src/libraries/Microsoft.Extensions.Options/src/OptionsCache.cs b/src/libraries/Microsoft.Extensions.Options/src/OptionsCache.cs
index b4094fe54de20..2497b77feca5a 100644
--- a/src/libraries/Microsoft.Extensions.Options/src/OptionsCache.cs
+++ b/src/libraries/Microsoft.Extensions.Options/src/OptionsCache.cs
@@ -15,7 +15,7 @@ public class OptionsCache<[DynamicallyAccessedMembers(Options.DynamicallyAccesse
IOptionsMonitorCache
where TOptions : class
{
- private readonly ConcurrentDictionary> _cache = new ConcurrentDictionary>(StringComparer.Ordinal);
+ private readonly ConcurrentDictionary> _cache = new ConcurrentDictionary>(concurrencyLevel: 1, capacity: 31, StringComparer.Ordinal); // 31 == default capacity
///
/// Clears all options instances from the cache.
@@ -34,8 +34,38 @@ public virtual TOptions GetOrAdd(string name, Func createOptions)
{
throw new ArgumentNullException(nameof(createOptions));
}
+
name = name ?? Options.DefaultName;
- return _cache.GetOrAdd(name, new Lazy(createOptions)).Value;
+ Lazy value;
+
+#if NETCOREAPP
+ value = _cache.GetOrAdd(name, static (name, createOptions) => new Lazy(createOptions), createOptions);
+#else
+ if (!_cache.TryGetValue(name, out value))
+ {
+ value = _cache.GetOrAdd(name, new Lazy(createOptions));
+ }
+#endif
+
+ return value.Value;
+ }
+
+ ///
+ /// Gets a named options instance, if available.
+ ///
+ /// The name of the options instance.
+ /// The options instance.
+ /// true if the options were retrieved; otherwise, false.
+ internal bool TryGetValue(string name, out TOptions options)
+ {
+ if (_cache.TryGetValue(name ?? Options.DefaultName, out Lazy lazy))
+ {
+ options = lazy.Value;
+ return true;
+ }
+
+ options = default;
+ return false;
}
///
@@ -50,8 +80,12 @@ public virtual bool TryAdd(string name, TOptions options)
{
throw new ArgumentNullException(nameof(options));
}
- name = name ?? Options.DefaultName;
- return _cache.TryAdd(name, new Lazy(() => options));
+
+ return _cache.TryAdd(name ?? Options.DefaultName, new Lazy(
+#if !NETCOREAPP
+ () =>
+#endif
+ options));
}
///
@@ -59,10 +93,7 @@ public virtual bool TryAdd(string name, TOptions options)
///
/// The name of the options instance.
/// Whether anything was removed.
- public virtual bool TryRemove(string name)
- {
- name = name ?? Options.DefaultName;
- return _cache.TryRemove(name, out Lazy ignored);
- }
+ public virtual bool TryRemove(string name) =>
+ _cache.TryRemove(name ?? Options.DefaultName, out _);
}
}
diff --git a/src/libraries/Microsoft.Extensions.Options/src/OptionsManager.cs b/src/libraries/Microsoft.Extensions.Options/src/OptionsManager.cs
index 71b5a134f3513..83fc0ecc8e905 100644
--- a/src/libraries/Microsoft.Extensions.Options/src/OptionsManager.cs
+++ b/src/libraries/Microsoft.Extensions.Options/src/OptionsManager.cs
@@ -29,13 +29,7 @@ public OptionsManager(IOptionsFactory factory)
///
/// The default configured instance, equivalent to Get(Options.DefaultName).
///
- public TOptions Value
- {
- get
- {
- return Get(Options.DefaultName);
- }
- }
+ public TOptions Value => Get(Options.DefaultName);
///
/// Returns a configured instance with the given .
@@ -44,8 +38,15 @@ public virtual TOptions Get(string name)
{
name = name ?? Options.DefaultName;
- // Store the options in our instance cache
- return _cache.GetOrAdd(name, () => _factory.Create(name));
+ if (!_cache.TryGetValue(name, out TOptions options))
+ {
+ // Store the options in our instance cache. Avoid closure on fast path by storing state into scoped locals.
+ IOptionsFactory localFactory = _factory;
+ string localName = name;
+ options = _cache.GetOrAdd(name, () => localFactory.Create(localName));
+ }
+
+ return options;
}
}
}
diff --git a/src/libraries/Microsoft.Extensions.Options/src/OptionsServiceCollectionExtensions.cs b/src/libraries/Microsoft.Extensions.Options/src/OptionsServiceCollectionExtensions.cs
index 10341d4e217d5..d9ff1e75b035b 100644
--- a/src/libraries/Microsoft.Extensions.Options/src/OptionsServiceCollectionExtensions.cs
+++ b/src/libraries/Microsoft.Extensions.Options/src/OptionsServiceCollectionExtensions.cs
@@ -4,8 +4,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
-using System.Linq;
-using System.Reflection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Options;
@@ -146,29 +144,29 @@ public static IServiceCollection PostConfigureAll(this IServiceCollect
where TConfigureOptions : class
=> services.ConfigureOptions(typeof(TConfigureOptions));
- private static bool IsAction(Type type)
- => (type.GetTypeInfo().IsGenericType && type.GetGenericTypeDefinition() == typeof(Action<>));
-
private static IEnumerable FindConfigurationServices(Type type)
{
- IEnumerable serviceTypes = type
- .GetTypeInfo()
- .ImplementedInterfaces
- .Where(t => t.GetTypeInfo().IsGenericType)
- .Where(t =>
- t.GetGenericTypeDefinition() == typeof(IConfigureOptions<>) ||
- t.GetGenericTypeDefinition() == typeof(IPostConfigureOptions<>) ||
- t.GetGenericTypeDefinition() == typeof(IValidateOptions<>));
- if (!serviceTypes.Any())
+ foreach (Type t in type.GetInterfaces())
{
- throw new InvalidOperationException(
- IsAction(type)
- ? SR.Error_NoConfigurationServicesAndAction
- : SR.Error_NoConfigurationServices);
+ if (t.IsGenericType)
+ {
+ Type gtd = t.GetGenericTypeDefinition();
+ if (gtd == typeof(IConfigureOptions<>) ||
+ gtd == typeof(IPostConfigureOptions<>) ||
+ gtd == typeof(IValidateOptions<>))
+ {
+ yield return t;
+ }
+ }
}
- return serviceTypes;
}
+ private static void ThrowNoConfigServices(Type type) =>
+ throw new InvalidOperationException(
+ type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Action<>) ?
+ SR.Error_NoConfigurationServicesAndAction :
+ SR.Error_NoConfigurationServices);
+
///
/// Registers a type that will have all of its ,
/// , and
@@ -182,11 +180,19 @@ public static IServiceCollection ConfigureOptions(
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type configureType)
{
services.AddOptions();
- IEnumerable serviceTypes = FindConfigurationServices(configureType);
- foreach (Type serviceType in serviceTypes)
+
+ bool added = false;
+ foreach (Type serviceType in FindConfigurationServices(configureType))
{
services.AddTransient(serviceType, configureType);
+ added = true;
+ }
+
+ if (!added)
+ {
+ ThrowNoConfigServices(configureType);
}
+
return services;
}
@@ -201,11 +207,20 @@ public static IServiceCollection ConfigureOptions(
public static IServiceCollection ConfigureOptions(this IServiceCollection services, object configureInstance)
{
services.AddOptions();
- IEnumerable serviceTypes = FindConfigurationServices(configureInstance.GetType());
- foreach (Type serviceType in serviceTypes)
+ Type configureType = configureInstance.GetType();
+
+ bool added = false;
+ foreach (Type serviceType in FindConfigurationServices(configureType))
{
services.AddSingleton(serviceType, configureInstance);
+ added = true;
+ }
+
+ if (!added)
+ {
+ ThrowNoConfigServices(configureType);
}
+
return services;
}
diff --git a/src/libraries/Native/Unix/Common/pal_config.h.in b/src/libraries/Native/Unix/Common/pal_config.h.in
index da1eb4df02a18..792e695a68584 100644
--- a/src/libraries/Native/Unix/Common/pal_config.h.in
+++ b/src/libraries/Native/Unix/Common/pal_config.h.in
@@ -113,6 +113,7 @@
#cmakedefine01 HAVE_CFMAKERAW
#cmakedefine01 HAVE_GETGROUPLIST
#cmakedefine01 HAVE_SYS_PROCINFO_H
+#cmakedefine01 HAVE_IOSS_H
// Mac OS X has stat64, but it is deprecated since plain stat now
// provides the same 64-bit aware struct when targeting OS X > 10.5
diff --git a/src/libraries/Native/Unix/System.Globalization.Native/pal_collation.c b/src/libraries/Native/Unix/System.Globalization.Native/pal_collation.c
index a9eb1d57d74c7..99edfd96bcf1f 100644
--- a/src/libraries/Native/Unix/System.Globalization.Native/pal_collation.c
+++ b/src/libraries/Native/Unix/System.Globalization.Native/pal_collation.c
@@ -59,12 +59,13 @@ struct SortHandle
SearchIteratorNode searchIteratorList[CompareOptionsMask + 1];
};
-typedef struct { UChar* items; size_t size; } UCharList;
-
// Hiragana character range
static const UChar hiraganaStart = 0x3041;
static const UChar hiraganaEnd = 0x309e;
static const UChar hiraganaToKatakanaOffset = 0x30a1 - 0x3041;
+// Length of the fullwidth characters from 'A' to 'Z'
+// We'll use it to map the casing of the full width 'A' to 'Z' characters
+static const int32_t FullWidthAlphabetRangeLength = 0xFF3A - 0xFF21 + 1;
// Mapping between half- and fullwidth characters.
// LowerChars are the characters that should sort lower than HigherChars
@@ -142,99 +143,101 @@ static int IsHalfFullHigherSymbol(UChar character)
}
/*
-Gets a string of custom collation rules, if necessary.
+Fill custom collation rules for ignoreKana cases.
Since the CompareOptions flags don't map 1:1 with ICU default functionality, we need to fall back to using
custom rules in order to support IgnoreKanaType and IgnoreWidth CompareOptions correctly.
*/
-static UCharList* GetCustomRules(int32_t options, UColAttributeValue strength, int isIgnoreSymbols)
+static void FillIgnoreKanaRules(UChar* completeRules, int32_t* fillIndex, int32_t completeRulesLength, int32_t isIgnoreKanaType)
{
- int isIgnoreKanaType = (options & CompareOptionsIgnoreKanaType) == CompareOptionsIgnoreKanaType;
- int isIgnoreWidth = (options & CompareOptionsIgnoreWidth) == CompareOptionsIgnoreWidth;
-
- // kana differs at the tertiary level
- int needsIgnoreKanaTypeCustomRule = isIgnoreKanaType && strength >= UCOL_TERTIARY;
- int needsNotIgnoreKanaTypeCustomRule = !isIgnoreKanaType && strength < UCOL_TERTIARY;
-
- // character width differs at the tertiary level
- int needsIgnoreWidthCustomRule = isIgnoreWidth && strength >= UCOL_TERTIARY;
- int needsNotIgnoreWidthCustomRule = !isIgnoreWidth && strength < UCOL_TERTIARY;
+ UChar compareChar = isIgnoreKanaType ? '=' : '<';
- if (!(needsIgnoreKanaTypeCustomRule || needsNotIgnoreKanaTypeCustomRule || needsIgnoreWidthCustomRule || needsNotIgnoreWidthCustomRule))
- return NULL;
+ assert((*fillIndex) + (4 * (hiraganaEnd - hiraganaStart + 1)) <= completeRulesLength);
+ if ((*fillIndex) + (4 * (hiraganaEnd - hiraganaStart + 1)) > completeRulesLength) // check the allocated the size
+ {
+ return;
+ }
- UCharList* customRules = (UCharList*)malloc(sizeof(UCharList));
- if (customRules == NULL)
+ for (UChar hiraganaChar = hiraganaStart; hiraganaChar <= hiraganaEnd; hiraganaChar++)
{
- return NULL;
+ // Hiragana is the range 3041 to 3096 & 309D & 309E
+ if (hiraganaChar <= 0x3096 || hiraganaChar >= 0x309D) // characters between 3096 and 309D are not mapped to katakana
+ {
+ completeRules[*fillIndex] = '&';
+ completeRules[(*fillIndex) + 1] = hiraganaChar;
+ completeRules[(*fillIndex) + 2] = compareChar;
+ completeRules[(*fillIndex) + 3] = hiraganaChar + hiraganaToKatakanaOffset;
+ (*fillIndex) += 4;
+ }
}
+}
- // If we need to create customRules, the KanaType custom rule will be 88 kana characters * 4 = 352 chars long
- // and the Width custom rule will be at most 212 halfwidth characters * 5 = 1060 chars long.
- int capacity =
- ((needsIgnoreKanaTypeCustomRule || needsNotIgnoreKanaTypeCustomRule) ? 4 * (hiraganaEnd - hiraganaStart + 1) : 0) +
- ((needsIgnoreWidthCustomRule || needsNotIgnoreWidthCustomRule) ? 5 * g_HalfFullCharsLength : 0);
+/*
+Fill custom collation rules for ignoreWidth cases.
- UChar* items;
- customRules->items = items = (UChar*)malloc((size_t)capacity * sizeof(UChar));
- if (customRules->items == NULL)
+Since the CompareOptions flags don't map 1:1 with ICU default functionality, we need to fall back to using
+custom rules in order to support IgnoreKanaType and IgnoreWidth CompareOptions correctly.
+*/
+static void FillIgnoreWidthRules(UChar* completeRules, int32_t* fillIndex, int32_t completeRulesLength, int32_t isIgnoreWidth, int32_t isIgnoreCase, int32_t isIgnoreSymbols)
+{
+ UChar compareChar = isIgnoreWidth ? '=' : '<';
+
+ UChar lowerChar;
+ UChar higherChar;
+ int needsEscape;
+
+ assert((*fillIndex) + (5 * g_HalfFullCharsLength) <= completeRulesLength);
+ if ((*fillIndex) + (5 * g_HalfFullCharsLength) > completeRulesLength)
{
- free(customRules);
- return NULL;
+ return;
}
- if (needsIgnoreKanaTypeCustomRule || needsNotIgnoreKanaTypeCustomRule)
+ for (int i = 0; i < g_HalfFullCharsLength; i++)
{
- UChar compareChar = needsIgnoreKanaTypeCustomRule ? '=' : '<';
-
- for (UChar hiraganaChar = hiraganaStart; hiraganaChar <= hiraganaEnd; hiraganaChar++)
+ lowerChar = g_HalfFullLowerChars[i];
+ higherChar = g_HalfFullHigherChars[i];
+ // the lower chars need to be checked for escaping since they contain ASCII punctuation
+ needsEscape = NeedsEscape(lowerChar);
+
+ // when isIgnoreSymbols is true and we are not ignoring width, check to see if
+ // this character is a symbol, and if so skip it
+ if (!(isIgnoreSymbols && (!isIgnoreWidth) && (needsEscape || IsHalfFullHigherSymbol(higherChar))))
{
- // Hiragana is the range 3041 to 3096 & 309D & 309E
- if (hiraganaChar <= 0x3096 || hiraganaChar >= 0x309D) // characters between 3096 and 309D are not mapped to katakana
+ completeRules[*fillIndex] = '&';
+ (*fillIndex)++;
+
+ if (needsEscape)
{
- assert(items - customRules->items <= capacity - 4);
- *(items++) = '&';
- *(items++) = hiraganaChar;
- *(items++) = compareChar;
- *(items++) = hiraganaChar + hiraganaToKatakanaOffset;
+ completeRules[*fillIndex] = '\\';
+ (*fillIndex)++;
}
+
+ completeRules[*fillIndex] = lowerChar;
+ completeRules[(*fillIndex) + 1] = compareChar;
+ completeRules[(*fillIndex) + 2] = higherChar;
+ (*fillIndex) += 3;
}
}
- if (needsIgnoreWidthCustomRule || needsNotIgnoreWidthCustomRule)
+ // When we have isIgnoreWidth is false, we sort the normal width latin alphabet characters before the full width latin alphabet characters
+ // e.g. `a` < `a` (\uFF41)
+ // This break the casing of the full width latin alphabet characters.
+ // e.g. `a` (\uFF41) == `A` (\uFF21).
+ // we are fixing back this case mapping here.
+ if (isIgnoreCase && (!isIgnoreWidth))
{
- UChar compareChar = needsIgnoreWidthCustomRule ? '=' : '<';
+ assert((*fillIndex) + (FullWidthAlphabetRangeLength * 4) <= completeRulesLength);
+ const int UpperCaseToLowerCaseOffset = 0xFF41 - 0xFF21;
- UChar lowerChar;
- UChar higherChar;
- int needsEscape;
- for (int i = 0; i < g_HalfFullCharsLength; i++)
+ for (UChar ch = 0xFF21; ch <= 0xFF3A; ch++)
{
- lowerChar = g_HalfFullLowerChars[i];
- higherChar = g_HalfFullHigherChars[i];
- // the lower chars need to be checked for escaping since they contain ASCII punctuation
- needsEscape = NeedsEscape(lowerChar);
-
- // when isIgnoreSymbols is true and we are not ignoring width, check to see if
- // this character is a symbol, and if so skip it
- if (!(isIgnoreSymbols && needsNotIgnoreWidthCustomRule && (needsEscape || IsHalfFullHigherSymbol(higherChar))))
- {
- assert(items - customRules->items <= capacity - 5);
- *(items++) = '&';
- if (needsEscape)
- {
- *(items++) = '\\';
- }
- *(items++) = lowerChar;
- *(items++) = compareChar;
- *(items++) = higherChar;
- }
+ completeRules[*fillIndex] = '&';
+ completeRules[(*fillIndex) + 1] = ch + UpperCaseToLowerCaseOffset;
+ completeRules[(*fillIndex) + 2] = '=';
+ completeRules[(*fillIndex) + 3] = ch;
+ (*fillIndex) += 4;
}
}
-
- customRules->size = (size_t)(items - customRules->items);
-
- return customRules;
}
/*
@@ -247,9 +250,11 @@ static UCollator* CloneCollatorWithOptions(const UCollator* pCollator, int32_t o
{
UColAttributeValue strength = ucol_getStrength(pCollator);
- int isIgnoreCase = (options & CompareOptionsIgnoreCase) == CompareOptionsIgnoreCase;
- int isIgnoreNonSpace = (options & CompareOptionsIgnoreNonSpace) == CompareOptionsIgnoreNonSpace;
- int isIgnoreSymbols = (options & CompareOptionsIgnoreSymbols) == CompareOptionsIgnoreSymbols;
+ int32_t isIgnoreCase = (options & CompareOptionsIgnoreCase) == CompareOptionsIgnoreCase;
+ int32_t isIgnoreNonSpace = (options & CompareOptionsIgnoreNonSpace) == CompareOptionsIgnoreNonSpace;
+ int32_t isIgnoreSymbols = (options & CompareOptionsIgnoreSymbols) == CompareOptionsIgnoreSymbols;
+ int32_t isIgnoreKanaType = (options & CompareOptionsIgnoreKanaType) == CompareOptionsIgnoreKanaType;
+ int32_t isIgnoreWidth = (options & CompareOptionsIgnoreWidth) == CompareOptionsIgnoreWidth;
if (isIgnoreCase)
{
@@ -262,34 +267,74 @@ static UCollator* CloneCollatorWithOptions(const UCollator* pCollator, int32_t o
}
UCollator* pClonedCollator;
- UCharList* customRules = GetCustomRules(options, strength, isIgnoreSymbols);
- if (customRules == NULL || customRules->size == 0)
+
+ // IgnoreWidth - it would be easy to IgnoreWidth by just setting Strength <= Secondary.
+ // For any strength under that, the width of the characters will be ignored.
+ // For strength above that, the width of the characters will be used in differentiation.
+ // a. However, this doesn’t play nice with IgnoreCase, since these Strength levels are overloaded.
+ // b. So the plan to support IgnoreWidth is to use customized rules.
+ // i. Since the character width is differentiated at “Tertiary” strength, we only need to use custom rules in specific cases.
+ // ii. If (IgnoreWidth == true && Strength > “Secondary”)
+ // 1. Build up a custom rule set for each half-width character and say that it is equal to the corresponding full-width character.
+ // a. ex: “0x30F2 = 0xFF66 & 0x30F3 = 0xFF9D & …”
+ // iii. If (IgnoreWidth == false && Strength <= “Secondary”)
+ // 1. Build up a custom rule set saying that the half-width and full-width characters have a primary level difference (which will cause it always to be unequal)
+ // a. Ex. “0x30F2 < 0xFF66 & 0x30F3 < 0xFF9D & …”
+ // IgnoreKanaType – this works the same way as IgnoreWidth, it uses the set of Hiragana and Katakana characters instead of half-width vs full-width characters to build the rules.
+ int32_t applyIgnoreKanaTypeCustomRule = isIgnoreKanaType ^ (strength < UCOL_TERTIARY); // kana differs at the tertiary level
+ int32_t applyIgnoreWidthTypeCustomRule = isIgnoreWidth ^ (strength < UCOL_TERTIARY); // character width differs at the tertiary level
+
+ int32_t customRuleLength = 0;
+ if (applyIgnoreKanaTypeCustomRule || applyIgnoreWidthTypeCustomRule)
+ {
+ // If we need to create customRules, the KanaType custom rule will be 88 kana characters * 4 = 352 chars long
+ // and the Width custom rule will be at most 212 halfwidth characters * 5 = 1060 chars long.
+ customRuleLength = (applyIgnoreKanaTypeCustomRule ? 4 * (hiraganaEnd - hiraganaStart + 1) : 0) +
+ (applyIgnoreWidthTypeCustomRule ? ((5 * g_HalfFullCharsLength) + (isIgnoreCase ? 4 * FullWidthAlphabetRangeLength : 0)) : 0) +
+ 1; // Adding extra terminator rule at the end to force ICU apply last actual entered rule, otherwise last actual rule get ignored.
+ }
+
+ if (customRuleLength == 0)
{
pClonedCollator = ucol_safeClone(pCollator, NULL, NULL, pErr);
}
else
{
- int32_t customRuleLength = (int32_t)customRules->size;
-
- int32_t localeRulesLength;
- const UChar* localeRules = ucol_getRules(pCollator, &localeRulesLength);
- int32_t completeRulesLength = localeRulesLength + customRuleLength + 1;
+ int32_t rulesLength;
+ const UChar* localeRules = ucol_getRules(pCollator, &rulesLength);
+ int32_t completeRulesLength = rulesLength + customRuleLength + 1;
UChar* completeRules = (UChar*)calloc((size_t)completeRulesLength, sizeof(UChar));
- for (int i = 0; i < localeRulesLength; i++)
+ for (int i = 0; i < rulesLength; i++)
{
completeRules[i] = localeRules[i];
}
- for (int i = 0; i < customRuleLength; i++)
+
+ if (applyIgnoreKanaTypeCustomRule)
{
- completeRules[localeRulesLength + i] = customRules->items[i];
+ FillIgnoreKanaRules(completeRules, &rulesLength, completeRulesLength, isIgnoreKanaType);
}
- pClonedCollator = ucol_openRules(completeRules, completeRulesLength, UCOL_DEFAULT, strength, NULL, pErr);
+ assert(rulesLength <= completeRulesLength);
+
+ if (applyIgnoreWidthTypeCustomRule)
+ {
+ FillIgnoreWidthRules(completeRules, &rulesLength, completeRulesLength, isIgnoreWidth, isIgnoreCase, isIgnoreSymbols);
+ }
+
+ assert(rulesLength + 4 <= completeRulesLength);
+
+ // Adding extra terminator rule at the end to force ICU apply last actual entered rule, otherwise last actual rule get ignored.
+ completeRules[rulesLength] = '&';
+ completeRules[rulesLength + 1] = 'a';
+ completeRules[rulesLength + 2] = '=';
+ completeRules[rulesLength + 3] = 'a';
+ rulesLength += 4;
+
+ pClonedCollator = ucol_openRules(completeRules, rulesLength, UCOL_DEFAULT, strength, NULL, pErr);
free(completeRules);
}
- free(customRules);
if (isIgnoreSymbols)
{
diff --git a/src/libraries/Native/Unix/System.Globalization.Native/pal_localeStringData.c b/src/libraries/Native/Unix/System.Globalization.Native/pal_localeStringData.c
index fb973ab2f079d..669d59f88e99c 100644
--- a/src/libraries/Native/Unix/System.Globalization.Native/pal_localeStringData.c
+++ b/src/libraries/Native/Unix/System.Globalization.Native/pal_localeStringData.c
@@ -243,8 +243,6 @@ int32_t GlobalizationNative_GetLocaleInfoString(const UChar* localeName,
case LocaleString_NativeCountryName:
uloc_getDisplayCountry(locale, locale, value, valueLength, &status);
break;
- case LocaleString_ListSeparator:
- // fall through
case LocaleString_ThousandSeparator:
status = GetLocaleInfoDecimalFormatSymbol(locale, UNUM_GROUPING_SEPARATOR_SYMBOL, value, valueLength);
break;
diff --git a/src/libraries/Native/Unix/System.Globalization.Native/pal_localeStringData.h b/src/libraries/Native/Unix/System.Globalization.Native/pal_localeStringData.h
index 4554a052b285d..a88400e4b5146 100644
--- a/src/libraries/Native/Unix/System.Globalization.Native/pal_localeStringData.h
+++ b/src/libraries/Native/Unix/System.Globalization.Native/pal_localeStringData.h
@@ -19,7 +19,6 @@ typedef enum
LocaleString_NativeLanguageName = 0x04,
LocaleString_EnglishCountryName = 0x00001002,
LocaleString_NativeCountryName = 0x08,
- LocaleString_ListSeparator = 0x0C,
LocaleString_DecimalSeparator = 0x0E,
LocaleString_ThousandSeparator = 0x0F,
LocaleString_Digits = 0x00000013,
diff --git a/src/libraries/Native/Unix/System.IO.Ports.Native/pal_termios.c b/src/libraries/Native/Unix/System.IO.Ports.Native/pal_termios.c
index fbdb53085370d..318886c5abc40 100644
--- a/src/libraries/Native/Unix/System.IO.Ports.Native/pal_termios.c
+++ b/src/libraries/Native/Unix/System.IO.Ports.Native/pal_termios.c
@@ -11,6 +11,9 @@
#if HAVE_SYS_FILIO_H
#include
#endif
+#if HAVE_IOSS_H
+#include
+#endif
/* This is dup of System/IO/Ports/NativeMethods.cs */
enum
@@ -352,6 +355,14 @@ int32_t SystemIoPortsNative_TermiosSetSpeed(intptr_t handle, int32_t speed)
if (brate == B0)
{
+#if HAVE_IOSS_H
+ // Looks like custom speed out of POSIX. Let see if we can set it via specialized call.
+ brate = speed;
+ if (ioctl(fd, IOSSIOSPEED, &brate) != -1)
+ {
+ return speed;
+ }
+#endif
errno = EINVAL;
return -1;
}
@@ -418,6 +429,7 @@ int32_t SystemIoPortsNative_TermiosReset(intptr_t handle, int32_t speed, int32_t
{
int fd = ToFileDescriptor(handle);
struct termios term;
+ speed_t brate;
int ret = 0;
if (tcgetattr(fd, &term) < 0)
@@ -503,18 +515,23 @@ int32_t SystemIoPortsNative_TermiosReset(intptr_t handle, int32_t speed, int32_t
if (speed)
{
- speed_t brate = SystemIoPortsNative_TermiosSpeed2Rate(speed);
+ brate = SystemIoPortsNative_TermiosSpeed2Rate(speed);
if (brate == B0)
{
+#if !HAVE_IOSS_H
+ // We can try to set non-standard speed after tcsetattr().
errno = EINVAL;
return -1;
+#endif
}
-
+ else
+ {
#if HAVE_CFSETSPEED
- ret = cfsetspeed(&term, brate);
+ ret = cfsetspeed(&term, brate);
#else
- ret = cfsetispeed(&term, brate) & cfsetospeed(&term, brate);
+ ret = cfsetispeed(&term, brate) & cfsetospeed(&term, brate);
#endif
+ }
}
if ((ret != 0) || (tcsetattr(fd, TCSANOW, &term) < 0))
@@ -522,5 +539,17 @@ int32_t SystemIoPortsNative_TermiosReset(intptr_t handle, int32_t speed, int32_t
return -1;
}
+#if HAVE_IOSS_H
+ if (speed && brate == B0)
+ {
+ // we have deferred non-standard speed.
+ brate = speed;
+ if (ioctl(fd, IOSSIOSPEED, &brate) == -1)
+ {
+ return -1;
+ }
+ }
+#endif
+
return 0;
}
diff --git a/src/libraries/Native/Unix/System.Native/pal_io.c b/src/libraries/Native/Unix/System.Native/pal_io.c
index ff02a7a653691..2b780b039a6c1 100644
--- a/src/libraries/Native/Unix/System.Native/pal_io.c
+++ b/src/libraries/Native/Unix/System.Native/pal_io.c
@@ -40,6 +40,15 @@
// Somehow, AIX mangles the definition for this behind a C++ def
// Redeclare it here
extern int getpeereid(int, uid_t *__restrict__, gid_t *__restrict__);
+#elif defined(__sun)
+#ifndef _KERNEL
+#define _KERNEL
+#define UNDEF_KERNEL
+#endif
+#include
+#ifdef UNDEF_KERNEL
+#undef _KERNEL
+#endif
#endif
#if HAVE_STAT64
@@ -1296,3 +1305,31 @@ int32_t SystemNative_LChflagsCanSetHiddenFlag(void)
return false;
#endif
}
+
+#ifdef __sun
+
+int32_t SystemNative_ReadProcessStatusInfo(pid_t pid, ProcessStatus* processStatus)
+{
+ char statusFilename[64];
+ snprintf(statusFilename, sizeof(statusFilename), "/proc/%d/psinfo", pid);
+
+ intptr_t fd;
+ while ((fd = open(statusFilename, O_RDONLY)) < 0 && errno == EINTR);
+ if (fd < 0)
+ {
+ return 0;
+ }
+
+ psinfo_t status;
+ int result = Common_Read(fd, &status, sizeof(psinfo_t));
+ close(fd);
+ if (result >= 0)
+ {
+ processStatus->ResidentSetSize = status.pr_rssize * 1024; // pr_rssize is in Kbytes
+ return 1;
+ }
+
+ return 0;
+}
+
+#endif // __sun
diff --git a/src/libraries/Native/Unix/System.Native/pal_io.h b/src/libraries/Native/Unix/System.Native/pal_io.h
index dbc2be8721a94..69b210765e20c 100644
--- a/src/libraries/Native/Unix/System.Native/pal_io.h
+++ b/src/libraries/Native/Unix/System.Native/pal_io.h
@@ -35,6 +35,14 @@ typedef struct
uint32_t UserFlags; // user defined flags
} FileStatus;
+#ifdef __sun
+typedef struct
+{
+ size_t ResidentSetSize;
+ // add more fields when needed.
+} ProcessStatus;
+#endif
+
/* Provide consistent access to nanosecond fields, if they exist. */
/* Seconds are always available through st_atime, st_mtime, st_ctime. */
@@ -710,3 +718,12 @@ PALEXPORT int32_t SystemNative_LChflags(const char* path, uint32_t flags);
* Returns true (non-zero) if supported, false (zero) if not.
*/
PALEXPORT int32_t SystemNative_LChflagsCanSetHiddenFlag(void);
+
+#ifdef __sun
+/**
+ * Reads the psinfo_t struct and converts into ProcessStatus.
+ *
+ * Returns 1 if the process status was read; otherwise, 0.
+ */
+PALEXPORT int32_t SystemNative_ReadProcessStatusInfo(pid_t pid, ProcessStatus* processStatus);
+#endif
diff --git a/src/libraries/Native/Unix/configure.cmake b/src/libraries/Native/Unix/configure.cmake
index cbd9feabc73a7..eef61c4c356df 100644
--- a/src/libraries/Native/Unix/configure.cmake
+++ b/src/libraries/Native/Unix/configure.cmake
@@ -836,6 +836,10 @@ check_include_files(
linux/can.h
HAVE_LINUX_CAN_H)
+check_include_files(
+ IOKit/serial/ioss.h
+ HAVE_IOSS_H)
+
check_symbol_exists(
getpeereid
unistd.h
diff --git a/src/libraries/System.Collections.Concurrent/ref/System.Collections.Concurrent.cs b/src/libraries/System.Collections.Concurrent/ref/System.Collections.Concurrent.cs
index c1a477bb048de..a7955b0912052 100644
--- a/src/libraries/System.Collections.Concurrent/ref/System.Collections.Concurrent.cs
+++ b/src/libraries/System.Collections.Concurrent/ref/System.Collections.Concurrent.cs
@@ -6,6 +6,7 @@
namespace System.Collections.Concurrent
{
+ [System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public partial class BlockingCollection : System.Collections.Generic.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.ICollection, System.Collections.IEnumerable, System.IDisposable
{
public BlockingCollection() { }
diff --git a/src/libraries/System.Collections.Concurrent/src/System/Collections/Concurrent/BlockingCollection.cs b/src/libraries/System.Collections.Concurrent/src/System/Collections/Concurrent/BlockingCollection.cs
index 40dc97191207e..3640d0d4e829b 100644
--- a/src/libraries/System.Collections.Concurrent/src/System/Collections/Concurrent/BlockingCollection.cs
+++ b/src/libraries/System.Collections.Concurrent/src/System/Collections/Concurrent/BlockingCollection.cs
@@ -15,6 +15,7 @@
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
+using System.Runtime.Versioning;
using System.Threading;
namespace System.Collections.Concurrent
@@ -38,6 +39,7 @@ namespace System.Collections.Concurrent
/// away as an .
///
/// Specifies the type of elements in the collection.
+ [UnsupportedOSPlatform("browser")]
[DebuggerTypeProxy(typeof(BlockingCollectionDebugView<>))]
[DebuggerDisplay("Count = {Count}, Type = {_collection}")]
public class BlockingCollection : IEnumerable, ICollection, IDisposable, IReadOnlyCollection
@@ -1801,6 +1803,7 @@ public BlockingCollectionDebugView(BlockingCollection collection)
}
/// Returns a snapshot of the underlying collection's elements.
+ [UnsupportedOSPlatform("browser")]
[DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
public T[] Items
{
diff --git a/src/libraries/System.Collections/tests/Generic/Dictionary/Dictionary.Tests.cs b/src/libraries/System.Collections/tests/Generic/Dictionary/Dictionary.Tests.cs
index ee9957b938448..653f6c7dacd72 100644
--- a/src/libraries/System.Collections/tests/Generic/Dictionary/Dictionary.Tests.cs
+++ b/src/libraries/System.Collections/tests/Generic/Dictionary/Dictionary.Tests.cs
@@ -337,6 +337,22 @@ public void CantAcceptDuplicateKeysFromSourceDictionary()
AssertExtensions.Throws(null, () => new Dictionary(source, StringComparer.OrdinalIgnoreCase));
}
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotInvariantGlobalization))]
+ // https://github.com/dotnet/runtime/issues/44681
+ public void DictionaryOrdinalIgnoreCaseCyrillicKeys()
+ {
+ const string Lower = "абвгдеёжзийклмнопрстуфхцчшщьыъэюя";
+ const string Higher = "АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЬЫЪЭЮЯ";
+
+ var dictionary = new Dictionary(StringComparer.OrdinalIgnoreCase);
+
+ for (int i = 0; i < Lower.Length; i++)
+ {
+ dictionary[Lower[i].ToString()] = i;
+ Assert.Equal(i, dictionary[Higher[i].ToString()]);
+ }
+ }
+
public static IEnumerable CopyConstructorStringComparerData
{
get
diff --git a/src/libraries/System.Collections/tests/Generic/Dictionary/HashCollisionScenarios/OutOfBoundsRegression.cs b/src/libraries/System.Collections/tests/Generic/Dictionary/HashCollisionScenarios/OutOfBoundsRegression.cs
index 934e57aafe4cc..eb7a7bf287542 100644
--- a/src/libraries/System.Collections/tests/Generic/Dictionary/HashCollisionScenarios/OutOfBoundsRegression.cs
+++ b/src/libraries/System.Collections/tests/Generic/Dictionary/HashCollisionScenarios/OutOfBoundsRegression.cs
@@ -54,56 +54,56 @@ public static void ComparerImplementations_Dictionary_WithWellKnownStringCompare
RunDictionaryTest(
equalityComparer: null,
- expectedInternalComparerBeforeCollisionThreshold: nonRandomizedOrdinalComparerType,
- expectedPublicComparerBeforeCollisionThreshold: EqualityComparer.Default.GetType(),
- expectedComparerAfterCollisionThreshold: randomizedOrdinalComparerType);
+ expectedInternalComparerTypeBeforeCollisionThreshold: nonRandomizedOrdinalComparerType,
+ expectedPublicComparerBeforeCollisionThreshold: EqualityComparer.Default,
+ expectedInternalComparerTypeAfterCollisionThreshold: randomizedOrdinalComparerType);
// EqualityComparer.Default comparer
RunDictionaryTest(
equalityComparer: EqualityComparer.Default,
- expectedInternalComparerBeforeCollisionThreshold: nonRandomizedOrdinalComparerType,
- expectedPublicComparerBeforeCollisionThreshold: EqualityComparer.Default.GetType(),
- expectedComparerAfterCollisionThreshold: randomizedOrdinalComparerType);
+ expectedInternalComparerTypeBeforeCollisionThreshold: nonRandomizedOrdinalComparerType,
+ expectedPublicComparerBeforeCollisionThreshold: EqualityComparer.Default,
+ expectedInternalComparerTypeAfterCollisionThreshold: randomizedOrdinalComparerType);
// Ordinal comparer
RunDictionaryTest(
equalityComparer: StringComparer.Ordinal,
- expectedInternalComparerBeforeCollisionThreshold: nonRandomizedOrdinalComparerType,
- expectedPublicComparerBeforeCollisionThreshold: StringComparer.Ordinal.GetType(),
- expectedComparerAfterCollisionThreshold: randomizedOrdinalComparerType);
+ expectedInternalComparerTypeBeforeCollisionThreshold: nonRandomizedOrdinalComparerType,
+ expectedPublicComparerBeforeCollisionThreshold: StringComparer.Ordinal,
+ expectedInternalComparerTypeAfterCollisionThreshold: randomizedOrdinalComparerType);
// OrdinalIgnoreCase comparer
RunDictionaryTest(
equalityComparer: StringComparer.OrdinalIgnoreCase,
- expectedInternalComparerBeforeCollisionThreshold: nonRandomizedOrdinalIgnoreCaseComparerType,
- expectedPublicComparerBeforeCollisionThreshold: StringComparer.OrdinalIgnoreCase.GetType(),
- expectedComparerAfterCollisionThreshold: randomizedOrdinalIgnoreCaseComparerType);
+ expectedInternalComparerTypeBeforeCollisionThreshold: nonRandomizedOrdinalIgnoreCaseComparerType,
+ expectedPublicComparerBeforeCollisionThreshold: StringComparer.OrdinalIgnoreCase,
+ expectedInternalComparerTypeAfterCollisionThreshold: randomizedOrdinalIgnoreCaseComparerType);
// linguistic comparer (not optimized)
RunDictionaryTest(
equalityComparer: StringComparer.InvariantCulture,
- expectedInternalComparerBeforeCollisionThreshold: StringComparer.InvariantCulture.GetType(),
- expectedPublicComparerBeforeCollisionThreshold: StringComparer.InvariantCulture.GetType(),
- expectedComparerAfterCollisionThreshold: StringComparer.InvariantCulture.GetType());
+ expectedInternalComparerTypeBeforeCollisionThreshold: StringComparer.InvariantCulture.GetType(),
+ expectedPublicComparerBeforeCollisionThreshold: StringComparer.InvariantCulture,
+ expectedInternalComparerTypeAfterCollisionThreshold: StringComparer.InvariantCulture.GetType());
static void RunDictionaryTest(
IEqualityComparer equalityComparer,
- Type expectedInternalComparerBeforeCollisionThreshold,
- Type expectedPublicComparerBeforeCollisionThreshold,
- Type expectedComparerAfterCollisionThreshold)
+ Type expectedInternalComparerTypeBeforeCollisionThreshold,
+ IEqualityComparer expectedPublicComparerBeforeCollisionThreshold,
+ Type expectedInternalComparerTypeAfterCollisionThreshold)
{
RunCollectionTestCommon(
() => new Dictionary(equalityComparer),
(dictionary, key) => dictionary.Add(key, null),
(dictionary, key) => dictionary.ContainsKey(key),
dictionary => dictionary.Comparer,
- expectedInternalComparerBeforeCollisionThreshold,
+ expectedInternalComparerTypeBeforeCollisionThreshold,
expectedPublicComparerBeforeCollisionThreshold,
- expectedComparerAfterCollisionThreshold);
+ expectedInternalComparerTypeAfterCollisionThreshold);
}
}
@@ -119,56 +119,56 @@ public static void ComparerImplementations_HashSet_WithWellKnownStringComparers(
RunHashSetTest(
equalityComparer: null,
- expectedInternalComparerBeforeCollisionThreshold: nonRandomizedOrdinalComparerType,
- expectedPublicComparerBeforeCollisionThreshold: EqualityComparer.Default.GetType(),
- expectedComparerAfterCollisionThreshold: randomizedOrdinalComparerType);
+ expectedInternalComparerTypeBeforeCollisionThreshold: nonRandomizedOrdinalComparerType,
+ expectedPublicComparerBeforeCollisionThreshold: EqualityComparer.Default,
+ expectedInternalComparerTypeAfterCollisionThreshold: randomizedOrdinalComparerType);
// EqualityComparer.Default comparer
RunHashSetTest(
equalityComparer: EqualityComparer.Default,
- expectedInternalComparerBeforeCollisionThreshold: nonRandomizedOrdinalComparerType,
- expectedPublicComparerBeforeCollisionThreshold: EqualityComparer.Default.GetType(),
- expectedComparerAfterCollisionThreshold: randomizedOrdinalComparerType);
+ expectedInternalComparerTypeBeforeCollisionThreshold: nonRandomizedOrdinalComparerType,
+ expectedPublicComparerBeforeCollisionThreshold: EqualityComparer.Default,
+ expectedInternalComparerTypeAfterCollisionThreshold: randomizedOrdinalComparerType);
// Ordinal comparer
RunHashSetTest(
equalityComparer: StringComparer.Ordinal,
- expectedInternalComparerBeforeCollisionThreshold: nonRandomizedOrdinalComparerType,
- expectedPublicComparerBeforeCollisionThreshold: StringComparer.Ordinal.GetType(),
- expectedComparerAfterCollisionThreshold: randomizedOrdinalComparerType);
+ expectedInternalComparerTypeBeforeCollisionThreshold: nonRandomizedOrdinalComparerType,
+ expectedPublicComparerBeforeCollisionThreshold: StringComparer.Ordinal,
+ expectedInternalComparerTypeAfterCollisionThreshold: randomizedOrdinalComparerType);
// OrdinalIgnoreCase comparer
RunHashSetTest(
equalityComparer: StringComparer.OrdinalIgnoreCase,
- expectedInternalComparerBeforeCollisionThreshold: nonRandomizedOrdinalIgnoreCaseComparerType,
- expectedPublicComparerBeforeCollisionThreshold: StringComparer.OrdinalIgnoreCase.GetType(),
- expectedComparerAfterCollisionThreshold: randomizedOrdinalIgnoreCaseComparerType);
+ expectedInternalComparerTypeBeforeCollisionThreshold: nonRandomizedOrdinalIgnoreCaseComparerType,
+ expectedPublicComparerBeforeCollisionThreshold: StringComparer.OrdinalIgnoreCase,
+ expectedInternalComparerTypeAfterCollisionThreshold: randomizedOrdinalIgnoreCaseComparerType);
// linguistic comparer (not optimized)
RunHashSetTest(
equalityComparer: StringComparer.InvariantCulture,
- expectedInternalComparerBeforeCollisionThreshold: StringComparer.InvariantCulture.GetType(),
- expectedPublicComparerBeforeCollisionThreshold: StringComparer.InvariantCulture.GetType(),
- expectedComparerAfterCollisionThreshold: StringComparer.InvariantCulture.GetType());
+ expectedInternalComparerTypeBeforeCollisionThreshold: StringComparer.InvariantCulture.GetType(),
+ expectedPublicComparerBeforeCollisionThreshold: StringComparer.InvariantCulture,
+ expectedInternalComparerTypeAfterCollisionThreshold: StringComparer.InvariantCulture.GetType());
static void RunHashSetTest(
IEqualityComparer equalityComparer,
- Type expectedInternalComparerBeforeCollisionThreshold,
- Type expectedPublicComparerBeforeCollisionThreshold,
- Type expectedComparerAfterCollisionThreshold)
+ Type expectedInternalComparerTypeBeforeCollisionThreshold,
+ IEqualityComparer expectedPublicComparerBeforeCollisionThreshold,
+ Type expectedInternalComparerTypeAfterCollisionThreshold)
{
RunCollectionTestCommon(
() => new HashSet(equalityComparer),
(set, key) => Assert.True(set.Add(key)),
(set, key) => set.Contains(key),
set => set.Comparer,
- expectedInternalComparerBeforeCollisionThreshold,
+ expectedInternalComparerTypeBeforeCollisionThreshold,
expectedPublicComparerBeforeCollisionThreshold,
- expectedComparerAfterCollisionThreshold);
+ expectedInternalComparerTypeAfterCollisionThreshold);
}
}
@@ -177,24 +177,18 @@ private static void RunCollectionTestCommon(
Action addKeyCallback,
Func containsKeyCallback,
Func> getComparerCallback,
- Type expectedInternalComparerBeforeCollisionThreshold,
- Type expectedPublicComparerBeforeCollisionThreshold,
- Type expectedComparerAfterCollisionThreshold)
+ Type expectedInternalComparerTypeBeforeCollisionThreshold,
+ IEqualityComparer expectedPublicComparerBeforeCollisionThreshold,
+ Type expectedInternalComparerTypeAfterCollisionThreshold)
{
TCollection collection = collectionFactory();
List allKeys = new List();
- const int StartOfRange = 0xE020; // use the Unicode Private Use range to avoid accidentally creating strings that really do compare as equal OrdinalIgnoreCase
- const int Stride = 0x40; // to ensure we don't accidentally reset the 0x20 bit of the seed, which is used to negate OrdinalIgnoreCase effects
-
// First, go right up to the collision threshold, but don't exceed it.
for (int i = 0; i < 100; i++)
{
- string newKey = GenerateCollidingString(i * Stride + StartOfRange);
- Assert.Equal(0, _lazyGetNonRandomizedHashCodeDel.Value(newKey)); // ensure has a zero hash code Ordinal
- Assert.Equal(0x24716ca0, _lazyGetNonRandomizedOrdinalIgnoreCaseHashCodeDel.Value(newKey)); // ensure has a zero hash code OrdinalIgnoreCase
-
+ string newKey = _collidingStrings[i];
addKeyCallback(collection, newKey);
allKeys.Add(newKey);
}
@@ -202,15 +196,18 @@ private static void RunCollectionTestCommon(
FieldInfo internalComparerField = collection.GetType().GetField("_comparer", BindingFlags.NonPublic | BindingFlags.Instance);
Assert.NotNull(internalComparerField);
- Assert.Equal(expectedInternalComparerBeforeCollisionThreshold, internalComparerField.GetValue(collection)?.GetType());
- Assert.Equal(expectedPublicComparerBeforeCollisionThreshold, getComparerCallback(collection).GetType());
+ IEqualityComparer actualInternalComparerBeforeCollisionThreshold = (IEqualityComparer)internalComparerField.GetValue(collection);
+ ValidateBehaviorOfInternalComparerVsPublicComparer(actualInternalComparerBeforeCollisionThreshold, expectedPublicComparerBeforeCollisionThreshold);
+
+ Assert.Equal(expectedInternalComparerTypeBeforeCollisionThreshold, actualInternalComparerBeforeCollisionThreshold?.GetType());
+ Assert.Equal(expectedPublicComparerBeforeCollisionThreshold, getComparerCallback(collection));
// Now exceed the collision threshold, which should rebucket entries.
// Continue adding a few more entries to ensure we didn't corrupt internal state.
for (int i = 100; i < 110; i++)
{
- string newKey = GenerateCollidingString(i * Stride + StartOfRange);
+ string newKey = _collidingStrings[i];
Assert.Equal(0, _lazyGetNonRandomizedHashCodeDel.Value(newKey)); // ensure has a zero hash code Ordinal
Assert.Equal(0x24716ca0, _lazyGetNonRandomizedOrdinalIgnoreCaseHashCodeDel.Value(newKey)); // ensure has a zero hash code OrdinalIgnoreCase
@@ -218,8 +215,11 @@ private static void RunCollectionTestCommon(
allKeys.Add(newKey);
}
- Assert.Equal(expectedComparerAfterCollisionThreshold, internalComparerField.GetValue(collection)?.GetType());
- Assert.Equal(expectedPublicComparerBeforeCollisionThreshold, getComparerCallback(collection).GetType()); // shouldn't change this return value after collision threshold met
+ IEqualityComparer actualInternalComparerAfterCollisionThreshold = (IEqualityComparer)internalComparerField.GetValue(collection);
+ ValidateBehaviorOfInternalComparerVsPublicComparer(actualInternalComparerAfterCollisionThreshold, expectedPublicComparerBeforeCollisionThreshold);
+
+ Assert.Equal(expectedInternalComparerTypeAfterCollisionThreshold, actualInternalComparerAfterCollisionThreshold?.GetType());
+ Assert.Equal(expectedPublicComparerBeforeCollisionThreshold, getComparerCallback(collection)); // shouldn't change this return value after collision threshold met
// And validate that all strings are present in the dictionary.
@@ -235,7 +235,7 @@ private static void RunCollectionTestCommon(
((ISerializable)collection).GetObjectData(si, new StreamingContext());
object serializedComparer = si.GetValue("Comparer", typeof(IEqualityComparer));
- Assert.Equal(expectedPublicComparerBeforeCollisionThreshold, serializedComparer.GetType());
+ Assert.Equal(expectedPublicComparerBeforeCollisionThreshold, serializedComparer);
}
private static Lazy> _lazyGetNonRandomizedHashCodeDel = new Lazy>(
@@ -244,27 +244,63 @@ private static void RunCollectionTestCommon(
private static Lazy> _lazyGetNonRandomizedOrdinalIgnoreCaseHashCodeDel = new Lazy>(
() => GetStringHashCodeOpenDelegate("GetNonRandomizedHashCodeOrdinalIgnoreCase"));
- // Generates a string with a well-known non-randomized hash code:
- // - string.GetNonRandomizedHashCode returns 0.
- // - string.GetNonRandomizedHashCodeOrdinalIgnoreCase returns 0x24716ca0.
- // Provide a different seed to produce a different string.
- private static string GenerateCollidingString(int seed)
+ // n.b., must be initialized *after* delegate fields above
+ private static readonly List _collidingStrings = GenerateCollidingStrings(110);
+
+ private static List GenerateCollidingStrings(int count)
{
- return string.Create(8, seed, (span, seed) =>
+ const int StartOfRange = 0xE020; // use the Unicode Private Use range to avoid accidentally creating strings that really do compare as equal OrdinalIgnoreCase
+ const int Stride = 0x40; // to ensure we don't accidentally reset the 0x20 bit of the seed, which is used to negate OrdinalIgnoreCase effects
+
+ int currentSeed = StartOfRange;
+
+ List collidingStrings = new List(count);
+ while (collidingStrings.Count < count)
{
- Span asBytes = MemoryMarshal.AsBytes(span);
-
- uint hash1 = (5381 << 16) + 5381;
- uint hash2 = BitOperations.RotateLeft(hash1, 5) + hash1;
-
- MemoryMarshal.Write(asBytes, ref seed);
- MemoryMarshal.Write(asBytes.Slice(4), ref hash2); // set hash2 := 0 (for Ordinal)
-
- hash1 = (BitOperations.RotateLeft(hash1, 5) + hash1) ^ (uint)seed;
- hash1 = (BitOperations.RotateLeft(hash1, 5) + hash1);
-
- MemoryMarshal.Write(asBytes.Slice(8), ref hash1); // set hash1 := 0 (for Ordinal)
- });
+ if (currentSeed > ushort.MaxValue)
+ {
+ throw new Exception($"Couldn't create enough colliding strings? Created {collidingStrings.Count}, needed {count}.");
+ }
+
+ string candidate = GenerateCollidingStringCandidate(currentSeed);
+
+ int ordinalHashCode = _lazyGetNonRandomizedHashCodeDel.Value(candidate);
+ Assert.Equal(0, ordinalHashCode); // ensure has a zero hash code Ordinal
+
+ int ordinalIgnoreCaseHashCode = _lazyGetNonRandomizedOrdinalIgnoreCaseHashCodeDel.Value(candidate);
+ if (ordinalIgnoreCaseHashCode == 0x24716ca0) // ensure has a zero hash code OrdinalIgnoreCase (might not have one)
+ {
+ collidingStrings.Add(candidate); // success!
+ }
+
+ currentSeed += Stride;
+ }
+
+ return collidingStrings;
+
+ // Generates a possible string with a well-known non-randomized hash code:
+ // - string.GetNonRandomizedHashCode returns 0.
+ // - string.GetNonRandomizedHashCodeOrdinalIgnoreCase returns 0x24716ca0.
+ // Provide a different seed to produce a different string.
+ // Caller must check OrdinalIgnoreCase hash code to ensure correctness.
+ static string GenerateCollidingStringCandidate(int seed)
+ {
+ return string.Create(8, seed, (span, seed) =>
+ {
+ Span asBytes = MemoryMarshal.AsBytes(span);
+
+ uint hash1 = (5381 << 16) + 5381;
+ uint hash2 = BitOperations.RotateLeft(hash1, 5) + hash1;
+
+ MemoryMarshal.Write(asBytes, ref seed);
+ MemoryMarshal.Write(asBytes.Slice(4), ref hash2); // set hash2 := 0 (for Ordinal)
+
+ hash1 = (BitOperations.RotateLeft(hash1, 5) + hash1) ^ (uint)seed;
+ hash1 = (BitOperations.RotateLeft(hash1, 5) + hash1);
+
+ MemoryMarshal.Write(asBytes.Slice(8), ref hash1); // set hash1 := 0 (for Ordinal)
+ });
+ }
}
private static Func GetStringHashCodeOpenDelegate(string methodName)
@@ -274,5 +310,44 @@ private static Func GetStringHashCodeOpenDelegate(string methodName
return method.CreateDelegate>(target: null); // create open delegate unbound to 'this'
}
+
+ private static void ValidateBehaviorOfInternalComparerVsPublicComparer(IEqualityComparer internalComparer, IEqualityComparer publicComparer)
+ {
+ // This helper ensures that when we substitute one of our internal comparers
+ // in place of the expected public comparer, the internal comparer's Equals
+ // and GetHashCode behavior are consistent with the public comparer's.
+
+ if (internalComparer is null)
+ {
+ internalComparer = EqualityComparer.Default;
+ }
+ if (publicComparer is null)
+ {
+ publicComparer = EqualityComparer.Default;
+ }
+
+ foreach (var pair in new[] {
+ ("Hello", "Hello"), // exactly equal
+ ("Hello", "Goodbye"), // not equal at all
+ ("Hello", "hello"), // case-insensitive equal
+ ("Hello", "He\u200dllo"), // equal under linguistic comparer
+ ("Hello", "HE\u200dLLO"), // equal under case-insensitive linguistic comparer
+ ("абвгдеёжзийклмнопрстуфхцчшщьыъэюя", "АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЬЫЪЭЮЯ"), // Cyrillic, case-insensitive equal
+ })
+ {
+ bool arePairElementsExpectedEqual = publicComparer.Equals(pair.Item1, pair.Item2);
+ Assert.Equal(arePairElementsExpectedEqual, internalComparer.Equals(pair.Item1, pair.Item2));
+
+ bool areInternalHashCodesEqual = internalComparer.GetHashCode(pair.Item1) == internalComparer.GetHashCode(pair.Item2);
+ if (arePairElementsExpectedEqual)
+ {
+ Assert.True(areInternalHashCodesEqual);
+ }
+ else if (!areInternalHashCodesEqual)
+ {
+ Assert.False(arePairElementsExpectedEqual);
+ }
+ }
+ }
}
}
diff --git a/src/libraries/System.ComponentModel.Primitives/ref/System.ComponentModel.Primitives.cs b/src/libraries/System.ComponentModel.Primitives/ref/System.ComponentModel.Primitives.cs
index c02213d837165..35d52c010c2a9 100644
--- a/src/libraries/System.ComponentModel.Primitives/ref/System.ComponentModel.Primitives.cs
+++ b/src/libraries/System.ComponentModel.Primitives/ref/System.ComponentModel.Primitives.cs
@@ -181,7 +181,7 @@ public void Dispose() { }
public void RemoveHandler(object key, System.Delegate? value) { }
}
[System.ComponentModel.DesignerAttribute("System.ComponentModel.Design.ComponentDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
- [System.ComponentModel.DesignerAttribute("System.Windows.Forms.Design.ComponentDocumentDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
+ [System.ComponentModel.DesignerAttribute("System.Windows.Forms.Design.ComponentDocumentDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.IRootDesigner, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
[System.ComponentModel.TypeConverterAttribute("System.ComponentModel.ComponentConverter, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public partial interface IComponent : System.IDisposable
{
diff --git a/src/libraries/System.ComponentModel.Primitives/src/System/ComponentModel/IComponent.cs b/src/libraries/System.ComponentModel.Primitives/src/System/ComponentModel/IComponent.cs
index 9d93f5fb9cb82..1cccaceeac6c2 100644
--- a/src/libraries/System.ComponentModel.Primitives/src/System/ComponentModel/IComponent.cs
+++ b/src/libraries/System.ComponentModel.Primitives/src/System/ComponentModel/IComponent.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.ComponentModel.Design;
using System.Runtime.InteropServices;
namespace System.ComponentModel
@@ -20,7 +21,8 @@ namespace System.ComponentModel
/// Provides functionality required by all components.
///
[Designer("System.ComponentModel.Design.ComponentDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
- [Designer("System.Windows.Forms.Design.ComponentDocumentDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
+ [Designer("System.Windows.Forms.Design.ComponentDocumentDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
+ "System.ComponentModel.Design.IRootDesigner, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
[TypeConverter("System.ComponentModel.ComponentConverter, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public interface IComponent : IDisposable
{
diff --git a/src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs b/src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs
index af7ab07bb2441..d741db09af163 100644
--- a/src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs
+++ b/src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs
@@ -810,7 +810,7 @@ public LookupBindingPropertiesAttribute(string dataSource, string displayMember,
public override bool Equals(object obj) { throw null; }
public override int GetHashCode() { throw null; }
}
- [System.ComponentModel.DesignerAttribute("System.Windows.Forms.Design.ComponentDocumentDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.ComponentModel.Design.IRootDesigner))]
+ [System.ComponentModel.DesignerAttribute("System.Windows.Forms.Design.ComponentDocumentDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.IRootDesigner, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
[System.ComponentModel.DesignerCategoryAttribute("Component")]
[System.ComponentModel.TypeConverterAttribute(typeof(System.ComponentModel.ComponentConverter))]
public partial class MarshalByValueComponent : System.ComponentModel.IComponent, System.IDisposable, System.IServiceProvider
@@ -1309,7 +1309,6 @@ public abstract partial class TypeDescriptionProvider
{
protected TypeDescriptionProvider() { }
protected TypeDescriptionProvider(System.ComponentModel.TypeDescriptionProvider parent) { }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
public virtual object CreateInstance(System.IServiceProvider provider, System.Type objectType, System.Type[] argTypes, object[] args) { throw null; }
public virtual System.Collections.IDictionary GetCache(object instance) { throw null; }
public virtual System.ComponentModel.ICustomTypeDescriptor GetExtendedTypeDescriptor(object instance) { throw null; }
@@ -1352,7 +1351,6 @@ public static void CreateAssociation(object primary, object secondary) { }
public static System.ComponentModel.Design.IDesigner CreateDesigner(System.ComponentModel.IComponent component, System.Type designerBaseType) { throw null; }
public static System.ComponentModel.EventDescriptor CreateEvent(System.Type componentType, System.ComponentModel.EventDescriptor oldEventDescriptor, params System.Attribute[] attributes) { throw null; }
public static System.ComponentModel.EventDescriptor CreateEvent(System.Type componentType, string name, System.Type type, params System.Attribute[] attributes) { throw null; }
- [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
public static object CreateInstance(System.IServiceProvider provider, System.Type objectType, System.Type[] argTypes, object[] args) { throw null; }
public static System.ComponentModel.PropertyDescriptor CreateProperty(System.Type componentType, System.ComponentModel.PropertyDescriptor oldPropertyDescriptor, params System.Attribute[] attributes) { throw null; }
public static System.ComponentModel.PropertyDescriptor CreateProperty(System.Type componentType, string name, System.Type type, params System.Attribute[] attributes) { throw null; }
diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/AttributeCollection.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/AttributeCollection.cs
index 49b1c4f9d5127..cc18c601d0eb6 100644
--- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/AttributeCollection.cs
+++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/AttributeCollection.cs
@@ -285,7 +285,7 @@ protected Attribute GetDefaultAttribute(Type attributeType)
}
else
{
- ConstructorInfo ci = reflect.UnderlyingSystemType.GetConstructor(Array.Empty());
+ ConstructorInfo ci = reflect.UnderlyingSystemType.GetConstructor(Type.EmptyTypes);
if (ci != null)
{
attr = (Attribute)ci.Invoke(Array.Empty());
diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/BindingList.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/BindingList.cs
index 7e13fec0e86e2..de3d0e2f80afb 100644
--- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/BindingList.cs
+++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/BindingList.cs
@@ -81,7 +81,7 @@ private bool ItemTypeHasDefaultConstructor
}
const BindingFlags BindingFlags = BindingFlags.Public | BindingFlags.Instance | BindingFlags.CreateInstance;
- return itemType.GetConstructor(BindingFlags, null, Array.Empty(), null) != null;
+ return itemType.GetConstructor(BindingFlags, null, Type.EmptyTypes, null) != null;
}
}
diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/MarshalByValueComponent.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/MarshalByValueComponent.cs
index 93d3485b1ec13..33db604c4160e 100644
--- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/MarshalByValueComponent.cs
+++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/MarshalByValueComponent.cs
@@ -10,7 +10,8 @@ namespace System.ComponentModel
/// Provides the base implementation for ,
/// which is the base class for all components in Win Forms.
///
- [Designer("System.Windows.Forms.Design.ComponentDocumentDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(IRootDesigner))]
+ [Designer("System.Windows.Forms.Design.ComponentDocumentDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
+ "System.ComponentModel.Design.IRootDesigner, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
[DesignerCategory("Component")]
[TypeConverter(typeof(ComponentConverter))]
public class MarshalByValueComponent : IComponent, IServiceProvider
diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/ReflectPropertyDescriptor.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/ReflectPropertyDescriptor.cs
index 1b55a0f17e943..975804a488169 100644
--- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/ReflectPropertyDescriptor.cs
+++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/ReflectPropertyDescriptor.cs
@@ -298,7 +298,7 @@ private MethodInfo GetMethodValue
if (_propInfo == null)
{
BindingFlags bindingFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.GetProperty;
- _propInfo = _componentClass.GetProperty(Name, bindingFlags, binder: null, PropertyType, Array.Empty(), Array.Empty());
+ _propInfo = _componentClass.GetProperty(Name, bindingFlags, binder: null, PropertyType, Type.EmptyTypes, Array.Empty());
}
if (_propInfo != null)
{
@@ -351,7 +351,7 @@ private MethodInfo ResetMethodValue
if (_receiverType == null)
{
- args = Array.Empty();
+ args = Type.EmptyTypes;
}
else
{
@@ -382,7 +382,7 @@ private MethodInfo SetMethodValue
for (Type t = ComponentType.BaseType; t != null && t != typeof(object); t = t.BaseType)
{
BindingFlags bindingFlags = BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.Instance;
- PropertyInfo p = t.GetProperty(name, bindingFlags, binder: null, PropertyType, Array.Empty(), null);
+ PropertyInfo p = t.GetProperty(name, bindingFlags, binder: null, PropertyType, Type.EmptyTypes, null);
if (p != null)
{
_setMethod = p.GetSetMethod(nonPublic: false);
@@ -403,7 +403,7 @@ private MethodInfo SetMethodValue
if (_propInfo == null)
{
BindingFlags bindingFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.GetProperty;
- _propInfo = _componentClass.GetProperty(Name, bindingFlags, binder: null, PropertyType, Array.Empty(), Array.Empty());
+ _propInfo = _componentClass.GetProperty(Name, bindingFlags, binder: null, PropertyType, Type.EmptyTypes, Array.Empty());
}
if (_propInfo != null)
{
@@ -435,7 +435,7 @@ private MethodInfo ShouldSerializeMethodValue
if (_receiverType == null)
{
- args = Array.Empty();
+ args = Type.EmptyTypes;
}
else
{
@@ -767,7 +767,7 @@ protected override void FillAttributes(IList attributes)
}
else
{
- memberInfo = currentReflectType.GetProperty(Name, bindingFlags, binder: null, PropertyType, Array.Empty(), Array.Empty());
+ memberInfo = currentReflectType.GetProperty(Name, bindingFlags, binder: null, PropertyType, Type.EmptyTypes, Array.Empty());
}
// Get custom attributes for the member info.
diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/ReflectTypeDescriptionProvider.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/ReflectTypeDescriptionProvider.cs
index ff4cd113da6f0..d8de50a61aeec 100644
--- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/ReflectTypeDescriptionProvider.cs
+++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/ReflectTypeDescriptionProvider.cs
@@ -247,7 +247,7 @@ public override object CreateInstance(IServiceProvider provider, Type objectType
}
else
{
- argTypes = Array.Empty();
+ argTypes = Type.EmptyTypes;
}
obj = objectType.GetConstructor(argTypes)?.Invoke(args);
diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/TypeDescriptionProvider.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/TypeDescriptionProvider.cs
index 565bc42e68f0a..28b7a3aa94d2e 100644
--- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/TypeDescriptionProvider.cs
+++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/TypeDescriptionProvider.cs
@@ -50,7 +50,6 @@ protected TypeDescriptionProvider(TypeDescriptionProvider parent)
/// parent provider was passed. If a parent provider was passed, this
/// method will invoke the parent provider's CreateInstance method.
///
- [UnsupportedOSPlatform("browser")]
public virtual object CreateInstance(IServiceProvider provider, Type objectType, Type[] argTypes, object[] args)
{
if (_parent != null)
diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/TypeDescriptor.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/TypeDescriptor.cs
index a542eb25d86ac..0dc2b3297adab 100644
--- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/TypeDescriptor.cs
+++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/TypeDescriptor.cs
@@ -429,7 +429,6 @@ public static EventDescriptor CreateEvent(Type componentType, EventDescriptor ol
/// a TypeDescriptionProvider object that is associated with the given
/// data type. If it finds one, it will delegate the call to that object.
///
- [UnsupportedOSPlatform("browser")]
public static object CreateInstance(IServiceProvider provider, Type objectType, Type[] argTypes, object[] args)
{
if (objectType == null)
diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/Timers/ElapsedEventArgs.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/Timers/ElapsedEventArgs.cs
index 8b59e07ca3762..09051c6cc5726 100644
--- a/src/libraries/System.ComponentModel.TypeConverter/src/System/Timers/ElapsedEventArgs.cs
+++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/Timers/ElapsedEventArgs.cs
@@ -5,9 +5,9 @@ namespace System.Timers
{
public class ElapsedEventArgs : EventArgs
{
- internal ElapsedEventArgs(long fileTime)
+ internal ElapsedEventArgs(DateTime localTime)
{
- SignalTime = DateTime.FromFileTime(fileTime);
+ SignalTime = localTime;
}
public DateTime SignalTime { get; }
diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/Timers/Timer.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/Timers/Timer.cs
index bb808042339b1..6812ef00011a9 100644
--- a/src/libraries/System.ComponentModel.TypeConverter/src/System/Timers/Timer.cs
+++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/Timers/Timer.cs
@@ -290,7 +290,7 @@ private void MyTimerCallback(object state)
_enabled = false;
}
- ElapsedEventArgs elapsedEventArgs = new ElapsedEventArgs(DateTime.UtcNow.ToFileTime());
+ ElapsedEventArgs elapsedEventArgs = new ElapsedEventArgs(DateTime.Now);
try
{
// To avoid race between remove handler and raising the event
diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/TimerTests.cs b/src/libraries/System.ComponentModel.TypeConverter/tests/TimerTests.cs
index 4f9437e0709f2..0904d7145912e 100644
--- a/src/libraries/System.ComponentModel.TypeConverter/tests/TimerTests.cs
+++ b/src/libraries/System.ComponentModel.TypeConverter/tests/TimerTests.cs
@@ -3,7 +3,7 @@
using Xunit;
using System.Threading;
-
+using System.Threading.Tasks;
using TestTimer = System.Timers.Timer;
namespace System.Timers.Tests
@@ -69,6 +69,31 @@ public void TestTimerStartAutoReset()
}
}
+ [Fact]
+ public async Task ElapsedEventArgs_MatchesExpectedValues()
+ {
+ using (var timer = new TestTimer(1) { AutoReset = false })
+ {
+ DateTime start = DateTime.Now;
+ var tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
+ timer.Elapsed += (sender, e) => tcs.SetResult(e);
+ timer.Start();
+
+ ElapsedEventArgs e = await tcs.Task;
+ Assert.False(timer.Enabled);
+
+ timer.Stop();
+ DateTime end = DateTime.Now;
+
+ const int WiggleRoomSeconds = 5;
+ Assert.Equal(DateTimeKind.Local, e.SignalTime.Kind);
+ Assert.InRange(
+ e.SignalTime.ToUniversalTime(),
+ start.ToUniversalTime() - TimeSpan.FromSeconds(WiggleRoomSeconds),
+ end.ToUniversalTime() + TimeSpan.FromSeconds(WiggleRoomSeconds));
+ }
+ }
+
[Theory]
[InlineData(int.MaxValue)]
[InlineData(0.5D)]
diff --git a/src/libraries/System.Composition.Convention/src/System/Composition/Convention/PartConventionBuilder.cs b/src/libraries/System.Composition.Convention/src/System/Composition/Convention/PartConventionBuilder.cs
index 0ae9618a77ab5..8fbfd3d51ec4e 100644
--- a/src/libraries/System.Composition.Convention/src/System/Composition/Convention/PartConventionBuilder.cs
+++ b/src/libraries/System.Composition.Convention/src/System/Composition/Convention/PartConventionBuilder.cs
@@ -13,7 +13,7 @@ namespace System.Composition.Convention
///
public class PartConventionBuilder
{
- private readonly Type[] _emptyTypeArray = Array.Empty();
+ private readonly Type[] _emptyTypeArray = Type.EmptyTypes;
private static List s_onImportsSatisfiedAttributeList;
private static readonly List s_importingConstructorList = new List() { new ImportingConstructorAttribute() };
private static readonly Type s_exportAttributeType = typeof(ExportAttribute);
diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/SectionInformation.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/SectionInformation.cs
index 4916e4188fcb1..29bb4faa3aaae 100644
--- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/SectionInformation.cs
+++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/SectionInformation.cs
@@ -501,7 +501,7 @@ private void VerifyIsAttachedToConfigRecord()
// It may not be editable for the following reasons:
// - We are in Runtime mode, not Design time
// - The section is not attached to a _configRecord.
- // - We are locked (ie. allowOveride = false )
+ // - We are locked (ie. AllowOverride = false )
// - We are a parent section (ie. Retrieved from GetParentSection)
//
internal void VerifyIsEditable()
diff --git a/src/libraries/System.Data.Common/ref/System.Data.Common.cs b/src/libraries/System.Data.Common/ref/System.Data.Common.cs
index 8541ef63bbc0e..423e82d28d8dd 100644
--- a/src/libraries/System.Data.Common/ref/System.Data.Common.cs
+++ b/src/libraries/System.Data.Common/ref/System.Data.Common.cs
@@ -1259,9 +1259,9 @@ public partial interface IDataRecord
object this[string name] { get; }
bool GetBoolean(int i);
byte GetByte(int i);
- long GetBytes(int i, long fieldOffset, byte[] buffer, int bufferoffset, int length);
+ long GetBytes(int i, long fieldOffset, byte[]? buffer, int bufferoffset, int length);
char GetChar(int i);
- long GetChars(int i, long fieldoffset, char[] buffer, int bufferoffset, int length);
+ long GetChars(int i, long fieldoffset, char[]? buffer, int bufferoffset, int length);
System.Data.IDataReader GetData(int i);
string GetDataTypeName(int i);
System.DateTime GetDateTime(int i);
@@ -2202,9 +2202,9 @@ protected DbDataRecord() { }
public abstract object this[string name] { get; }
public abstract bool GetBoolean(int i);
public abstract byte GetByte(int i);
- public abstract long GetBytes(int i, long dataIndex, byte[] buffer, int bufferIndex, int length);
+ public abstract long GetBytes(int i, long dataIndex, byte[]? buffer, int bufferIndex, int length);
public abstract char GetChar(int i);
- public abstract long GetChars(int i, long dataIndex, char[] buffer, int bufferIndex, int length);
+ public abstract long GetChars(int i, long dataIndex, char[]? buffer, int bufferIndex, int length);
public System.Data.IDataReader GetData(int i) { throw null; }
public abstract string GetDataTypeName(int i);
public abstract System.DateTime GetDateTime(int i);
diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/DataRecordInternal.cs b/src/libraries/System.Data.Common/src/System/Data/Common/DataRecordInternal.cs
index 7c0989201be80..0bad614a43049 100644
--- a/src/libraries/System.Data.Common/src/System/Data/Common/DataRecordInternal.cs
+++ b/src/libraries/System.Data.Common/src/System/Data/Common/DataRecordInternal.cs
@@ -100,7 +100,7 @@ public override byte GetByte(int i)
return ((byte)_values[i]);
}
- public override long GetBytes(int i, long dataIndex, byte[] buffer, int bufferIndex, int length)
+ public override long GetBytes(int i, long dataIndex, byte[]? buffer, int bufferIndex, int length)
{
int cbytes = 0;
int ndataIndex;
@@ -170,7 +170,7 @@ public override long GetBytes(int i, long dataIndex, byte[] buffer, int bufferIn
public override char GetChar(int i) => ((string)_values[i])[0];
- public override long GetChars(int i, long dataIndex, char[] buffer, int bufferIndex, int length)
+ public override long GetChars(int i, long dataIndex, char[]? buffer, int bufferIndex, int length)
{
// if the object doesn't contain a char[] then the user will get an exception
string s = (string)_values[i];
diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/DbDataRecord.cs b/src/libraries/System.Data.Common/src/System/Data/Common/DbDataRecord.cs
index 189e17610ac7e..605045fe5b632 100644
--- a/src/libraries/System.Data.Common/src/System/Data/Common/DbDataRecord.cs
+++ b/src/libraries/System.Data.Common/src/System/Data/Common/DbDataRecord.cs
@@ -19,11 +19,11 @@ protected DbDataRecord() : base() { }
public abstract byte GetByte(int i);
- public abstract long GetBytes(int i, long dataIndex, byte[] buffer, int bufferIndex, int length);
+ public abstract long GetBytes(int i, long dataIndex, byte[]? buffer, int bufferIndex, int length);
public abstract char GetChar(int i);
- public abstract long GetChars(int i, long dataIndex, char[] buffer, int bufferIndex, int length);
+ public abstract long GetChars(int i, long dataIndex, char[]? buffer, int bufferIndex, int length);
public IDataReader GetData(int i) => GetDbDataReader(i);
diff --git a/src/libraries/System.Data.Common/src/System/Data/IDataRecord.cs b/src/libraries/System.Data.Common/src/System/Data/IDataRecord.cs
index 2563e75aff3b6..8dad2b2c18b1b 100644
--- a/src/libraries/System.Data.Common/src/System/Data/IDataRecord.cs
+++ b/src/libraries/System.Data.Common/src/System/Data/IDataRecord.cs
@@ -16,9 +16,9 @@ public interface IDataRecord
int GetOrdinal(string name);
bool GetBoolean(int i);
byte GetByte(int i);
- long GetBytes(int i, long fieldOffset, byte[] buffer, int bufferoffset, int length);
+ long GetBytes(int i, long fieldOffset, byte[]? buffer, int bufferoffset, int length);
char GetChar(int i);
- long GetChars(int i, long fieldoffset, char[] buffer, int bufferoffset, int length);
+ long GetChars(int i, long fieldoffset, char[]? buffer, int bufferoffset, int length);
Guid GetGuid(int i);
short GetInt16(int i);
int GetInt32(int i);
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 87ad725689c71..20d918a90a125 100644
--- a/src/libraries/System.Data.Odbc/src/System.Data.Odbc.csproj
+++ b/src/libraries/System.Data.Odbc/src/System.Data.Odbc.csproj
@@ -114,7 +114,7 @@
-
+
diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.cs
index 50823c0f6ba77..38351198a340f 100644
--- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.cs
+++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.cs
@@ -1017,7 +1017,7 @@ internal static Activity CreateAndStart(ActivitySource source, string name, Acti
}
}
- activity.StartTimeUtc = startTime == default ? DateTime.UtcNow : startTime.UtcDateTime;
+ activity.StartTimeUtc = startTime == default ? GetUtcNow() : startTime.UtcDateTime;
activity.IsAllDataRequested = request == ActivitySamplingResult.AllData || request == ActivitySamplingResult.AllDataAndRecorded;
diff --git a/src/libraries/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj b/src/libraries/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj
index c7f5c572c1bf2..3c41c1027ffc5 100644
--- a/src/libraries/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj
+++ b/src/libraries/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj
@@ -339,7 +339,6 @@
-
diff --git a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Linux.cs b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Linux.cs
index 01461e9b4f061..957d0746cc9cb 100644
--- a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Linux.cs
+++ b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Linux.cs
@@ -4,18 +4,13 @@
using System.Collections.Generic;
using System.Globalization;
using System.IO;
-using System.Linq;
-using System.Text;
namespace System.Diagnostics
{
internal static partial class ProcessManager
{
/// Gets the IDs of all processes on the current machine.
- public static int[] GetProcessIds()
- {
- return EnumerateProcessIds().ToArray();
- }
+ public static int[] GetProcessIds() => new List(EnumerateProcessIds()).ToArray();
/// Gets process infos for each process on the specified machine.
/// The target machine.
@@ -23,11 +18,10 @@ public static int[] GetProcessIds()
public static ProcessInfo[] GetProcessInfos(string machineName)
{
ThrowIfRemoteMachine(machineName);
- int[] procIds = GetProcessIds(machineName);
// Iterate through all process IDs to load information about each process
- var processes = new List(procIds.Length);
- foreach (int pid in procIds)
+ var processes = new List();
+ foreach (int pid in EnumerateProcessIds())
{
ProcessInfo? pi = CreateProcessInfo(pid);
if (pi != null)
diff --git a/src/libraries/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs b/src/libraries/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs
index e1c3c553f8574..88b1573536ae3 100644
--- a/src/libraries/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs
+++ b/src/libraries/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs
@@ -957,6 +957,7 @@ public void StartInfo_NotepadWithContent(bool useShellExecute)
}
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer), // Nano does not support UseShellExecute
+ nameof(PlatformDetection.IsNotWindowsServerCore), // https://github.com/dotnet/runtime/issues/26231
nameof(PlatformDetection.IsNotWindows8x))] // https://github.com/dotnet/runtime/issues/22007
[OuterLoop("Launches notepad")]
[PlatformSpecific(TestPlatforms.Windows)]
@@ -1168,6 +1169,11 @@ public void StartInfo_NotepadWithContent_withArgumentList(bool useShellExecute)
private void VerifyNotepadMainWindowTitle(Process process, string filename)
{
+ if (PlatformDetection.IsWindowsServerCore)
+ {
+ return; // On Server Core, notepad exists but does not return a title
+ }
+
// On some Windows versions, the file extension is not included in the title
string expected = Path.GetFileNameWithoutExtension(filename);
diff --git a/src/libraries/System.Diagnostics.TextWriterTraceListener/src/System/Diagnostics/XmlWriterTraceListener.cs b/src/libraries/System.Diagnostics.TextWriterTraceListener/src/System/Diagnostics/XmlWriterTraceListener.cs
index bf97f5fe8418c..798968dfce17a 100644
--- a/src/libraries/System.Diagnostics.TextWriterTraceListener/src/System/Diagnostics/XmlWriterTraceListener.cs
+++ b/src/libraries/System.Diagnostics.TextWriterTraceListener/src/System/Diagnostics/XmlWriterTraceListener.cs
@@ -258,14 +258,14 @@ private void WriteEndHeader()
string? processName = s_processName;
if (processName is null)
{
- try
+ if (OperatingSystem.IsBrowser()) // Process isn't supported on Browser
{
- using Process process = Process.GetCurrentProcess();
- s_processName = processName = process.ProcessName;
+ s_processName = processName = string.Empty;
}
- catch (PlatformNotSupportedException) // Process isn't supported on Browser
+ else
{
- s_processName = processName = string.Empty;
+ using Process process = Process.GetCurrentProcess();
+ s_processName = processName = process.ProcessName;
}
}
diff --git a/src/libraries/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.Counters.cs b/src/libraries/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.Counters.cs
index 2e1cce9f780a4..56c748f026e3e 100644
--- a/src/libraries/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.Counters.cs
+++ b/src/libraries/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.Counters.cs
@@ -3,6 +3,7 @@
namespace System.Diagnostics.Tracing
{
+ [System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract partial class DiagnosticCounter : System.IDisposable
{
internal DiagnosticCounter() { }
@@ -13,11 +14,13 @@ internal DiagnosticCounter() { }
public void AddMetadata(string key, string? value) { }
public void Dispose() { }
}
+ [System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public partial class PollingCounter : System.Diagnostics.Tracing.DiagnosticCounter
{
public PollingCounter(string name, System.Diagnostics.Tracing.EventSource eventSource, System.Func metricProvider) { }
public override string ToString() { throw null; }
}
+ [System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public partial class IncrementingEventCounter : System.Diagnostics.Tracing.DiagnosticCounter
{
public IncrementingEventCounter(string name, System.Diagnostics.Tracing.EventSource eventSource) { }
@@ -25,12 +28,14 @@ public IncrementingEventCounter(string name, System.Diagnostics.Tracing.EventSou
public void Increment(double increment = 1) { }
public override string ToString() { throw null; }
}
+ [System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public partial class IncrementingPollingCounter : System.Diagnostics.Tracing.DiagnosticCounter
{
public IncrementingPollingCounter(string name, System.Diagnostics.Tracing.EventSource eventSource, System.Func totalValueProvider) { }
public System.TimeSpan DisplayRateTimeScale { get { throw null; } set { } }
public override string ToString() { throw null; }
}
+ [System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public partial class EventCounter : System.Diagnostics.Tracing.DiagnosticCounter
{
public EventCounter(string name, System.Diagnostics.Tracing.EventSource eventSource) { }
diff --git a/src/libraries/System.Globalization/tests/CompareInfo/CompareInfoTests.Compare.cs b/src/libraries/System.Globalization/tests/CompareInfo/CompareInfoTests.Compare.cs
index 57704146c8b68..98890c0c4fdbf 100644
--- a/src/libraries/System.Globalization/tests/CompareInfo/CompareInfoTests.Compare.cs
+++ b/src/libraries/System.Globalization/tests/CompareInfo/CompareInfoTests.Compare.cs
@@ -455,5 +455,31 @@ public void Compare_Invalid()
AssertExtensions.Throws("string2", () => s_invariantCompare.Compare("Test", 0, 2, "Test", 2, 3));
AssertExtensions.Throws("string2", () => s_invariantCompare.Compare("Test", 0, 2, "Test", 2, 3, CompareOptions.None));
}
+
+ [Fact]
+ public void TestIgnoreKanaAndWidthCases()
+ {
+ for (char c = '\uFF41'; c <= '\uFF5A'; c++) // Full width 'a' to `z`
+ {
+ Assert.False(string.Equals(new string(c, 1), new string((char) (c - 0x20), 1), StringComparison.InvariantCulture), $"Expected '{(int)c:x4}' != '{c - 0x20:x4}'");
+ Assert.True(string.Equals(new string(c, 1), new string((char) (c - 0x20), 1), StringComparison.InvariantCultureIgnoreCase), $"Expected '{(int)c:x4}' == '{c - 0x20:x4}'");
+ }
+
+ // Edge case of the Ignore Width.
+ Assert.False(string.Compare("\u3162\u3163", "\uFFDB\uFFDC", CultureInfo.InvariantCulture, CompareOptions.None) == 0, $"Expect '0x3162 0x3163' != '0xFFDB 0xFFDC'");
+ Assert.True(string.Compare("\u3162\u3163", "\uFFDB\uFFDC", CultureInfo.InvariantCulture, CompareOptions.IgnoreWidth) == 0, "Expect '0x3162 0x3163' == '0xFFDB 0xFFDC'");
+
+ const char hiraganaStart = '\u3041';
+ const char hiraganaEnd = '\u3096';
+ const int hiraganaToKatakanaOffset = 0x30a1 - 0x3041;
+
+ for (Char hiraganaChar = hiraganaStart; hiraganaChar <= hiraganaEnd; hiraganaChar++)
+ {
+ Assert.False(string.Compare(new string(hiraganaChar, 1), new string((char)(hiraganaChar + hiraganaToKatakanaOffset), 1), CultureInfo.InvariantCulture, CompareOptions.IgnoreCase) == 0,
+ $"Expect '{(int)hiraganaChar:x4}' != {(int)hiraganaChar + hiraganaToKatakanaOffset:x4} with CompareOptions.IgnoreCase");
+ Assert.True(string.Compare(new string(hiraganaChar, 1), new string((char)(hiraganaChar + hiraganaToKatakanaOffset), 1), CultureInfo.InvariantCulture, CompareOptions.IgnoreKanaType) == 0,
+ $"Expect '{(int)hiraganaChar:x4}' == {(int)hiraganaChar + hiraganaToKatakanaOffset:x4} with CompareOptions.IgnoreKanaType");
+ }
+ }
}
}
diff --git a/src/libraries/System.Globalization/tests/System/Globalization/TextInfoTests.cs b/src/libraries/System.Globalization/tests/System/Globalization/TextInfoTests.cs
index 3ab4461d0176a..f0c56f385c146 100644
--- a/src/libraries/System.Globalization/tests/System/Globalization/TextInfoTests.cs
+++ b/src/libraries/System.Globalization/tests/System/Globalization/TextInfoTests.cs
@@ -120,10 +120,42 @@ public void IsRightToLeft(string name, bool expected)
Assert.Equal(expected, new CultureInfo(name).TextInfo.IsRightToLeft);
}
- [Fact]
- public void ListSeparator_EnUS()
- {
- Assert.NotEqual(string.Empty, new CultureInfo("en-US").TextInfo.ListSeparator);
+ [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindows7))]
+ [InlineData("ar-SA", ";")]
+ [InlineData("as-IN", ",")]
+ [InlineData("ba-RU", ";")]
+ [InlineData("bs-cyrl-BA", ";")]
+ [InlineData("de-DE", ";")]
+ [InlineData("dv-MV", "\u060C")]
+ [InlineData("en-GB", ",")]
+ [InlineData("en-US", ",")]
+ [InlineData("es-ES", ";")]
+ [InlineData("es-MX", ",")]
+ [InlineData("fa-IR", "\u061B")]
+ [InlineData("fr-FR", ";")]
+ [InlineData("hr-HR", ";")]
+ [InlineData("it-IT", ";")]
+ [InlineData("ko-KR", ",")]
+ [InlineData("ku-arab-iq", "\u061B")]
+ [InlineData("nl-NL", ";")]
+ [InlineData("pl-pl", ";")]
+ [InlineData("pt-PT", ";")]
+ [InlineData("ru-RU", ";")]
+ [InlineData("sv-SE", ";")]
+ [InlineData("th-TH", ",")]
+ [InlineData("ja-jp", ",")]
+ [InlineData("zh-CN", ",")]
+ [InlineData("", ",")]
+ public void ListSeparatorTest(string cultureName, string separator)
+ {
+ try
+ {
+ Assert.Equal(separator, CultureInfo.GetCultureInfo(cultureName).TextInfo.ListSeparator);
+ }
+ catch (CultureNotFoundException)
+ {
+ // Ignore the cultures we cannot create on downlevel versions.
+ }
}
[Theory]
diff --git a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PackUriHelper.PackUriScheme.cs b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PackUriHelper.PackUriScheme.cs
index 5a6558e28031d..b9b0fc231f2df 100644
--- a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PackUriHelper.PackUriScheme.cs
+++ b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PackUriHelper.PackUriScheme.cs
@@ -3,7 +3,6 @@
using System.Diagnostics;
using System.Text;
-using System.Linq;
namespace System.IO.Packaging
{
@@ -286,7 +285,7 @@ private static string EscapeSpecialCharacters(string path)
// This is currently enforced by the order of characters in the s_specialCharacterChars array
foreach (char c in s_specialCharacterChars)
{
- if (path.Contains(c))
+ if (path.IndexOf(c) != -1)
{
path = path.Replace(c.ToString(), Uri.HexEscape(c));
}
diff --git a/src/libraries/System.IO.Pipes/src/System.IO.Pipes.csproj b/src/libraries/System.IO.Pipes/src/System.IO.Pipes.csproj
index 66f0da7b4d6a6..a89cd7202c08e 100644
--- a/src/libraries/System.IO.Pipes/src/System.IO.Pipes.csproj
+++ b/src/libraries/System.IO.Pipes/src/System.IO.Pipes.csproj
@@ -167,8 +167,6 @@
Link="Common\Interop\Unix\Interop.GetEUid.cs" />
-
diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Expressions.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Expressions.cs
index aab1e749747cc..ce0cb7eb03275 100644
--- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Expressions.cs
+++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Expressions.cs
@@ -183,7 +183,7 @@ private void EmitInvocationExpression(Expression expr, CompilationFlags flags)
if (typeof(LambdaExpression).IsAssignableFrom(expr.Type))
{
// if the invoke target is a lambda expression tree, first compile it into a delegate
- expr = Expression.Call(expr, expr.Type.GetMethod("Compile", Array.Empty())!);
+ expr = Expression.Call(expr, expr.Type.GetMethod("Compile", Type.EmptyTypes)!);
}
EmitMethodCall(expr, expr.Type.GetInvokeMethod(), node, CompilationFlags.EmitAsNoTail | CompilationFlags.EmitExpressionStart);
diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/LightCompiler.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/LightCompiler.cs
index 534a3f7369887..6f9f915169e4d 100644
--- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/LightCompiler.cs
+++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/LightCompiler.cs
@@ -2671,7 +2671,7 @@ private void CompileInvocationExpression(Expression expr)
if (typeof(LambdaExpression).IsAssignableFrom(node.Expression.Type))
{
- MethodInfo compMethod = node.Expression.Type.GetMethod("Compile", Array.Empty())!;
+ MethodInfo compMethod = node.Expression.Type.GetMethod("Compile", Type.EmptyTypes)!;
CompileMethodCallExpression(
Expression.Call(
node.Expression,
diff --git a/src/libraries/System.Linq.Expressions/tests/DelegateType/DelegateCreationTests.cs b/src/libraries/System.Linq.Expressions/tests/DelegateType/DelegateCreationTests.cs
index 264edef5ad3cb..9237cf4ee61d1 100644
--- a/src/libraries/System.Linq.Expressions/tests/DelegateType/DelegateCreationTests.cs
+++ b/src/libraries/System.Linq.Expressions/tests/DelegateType/DelegateCreationTests.cs
@@ -41,7 +41,7 @@ public static IEnumerable ExcessiveLengthOpenGenericTypeArgs()
public static IEnumerable EmptyTypeArgs()
{
- yield return new object[] { Array.Empty() };
+ yield return new object[] { Type.EmptyTypes };
}
public static IEnumerable ByRefTypeArgs()
diff --git a/src/libraries/System.Linq.Expressions/tests/ExceptionHandling/ExceptionHandlingExpressions.cs b/src/libraries/System.Linq.Expressions/tests/ExceptionHandling/ExceptionHandlingExpressions.cs
index dea5dfc3c092a..d9d1d951a4418 100644
--- a/src/libraries/System.Linq.Expressions/tests/ExceptionHandling/ExceptionHandlingExpressions.cs
+++ b/src/libraries/System.Linq.Expressions/tests/ExceptionHandling/ExceptionHandlingExpressions.cs
@@ -258,7 +258,7 @@ public void CatchFromExternallyThrownString(bool useInterpreter)
ModuleBuilder module = assembly.DefineDynamicModule("Name");
TypeBuilder type = module.DefineType("Type");
MethodBuilder throwingMethod = type.DefineMethod(
- "WillThrow", MethodAttributes.Public | MethodAttributes.Static, typeof(void), Array.Empty());
+ "WillThrow", MethodAttributes.Public | MethodAttributes.Static, typeof(void), Type.EmptyTypes);
ILGenerator ilGen = throwingMethod.GetILGenerator();
ilGen.Emit(OpCodes.Ldstr, "An Exceptional Exception!");
ilGen.Emit(OpCodes.Throw);
@@ -887,7 +887,7 @@ public void FilterBeforeInnerFinally(bool useInterpreter)
*/
ConstantExpression builder = Expression.Constant(sb);
- Type[] noTypes = Array.Empty();
+ Type[] noTypes = Type.EmptyTypes;
TryExpression tryExp = Expression.TryCatch(
Expression.TryFinally(
Expression.Block(
@@ -911,7 +911,7 @@ public void FilterBeforeInnerFault(bool useInterpreter)
{
StringBuilder sb = new StringBuilder();
ConstantExpression builder = Expression.Constant(sb);
- Type[] noTypes = Array.Empty();
+ Type[] noTypes = Type.EmptyTypes;
TryExpression tryExp = Expression.TryCatch(
Expression.TryFault(
Expression.Block(
diff --git a/src/libraries/System.Linq.Parallel/Directory.Build.props b/src/libraries/System.Linq.Parallel/Directory.Build.props
index e8d65546d0c80..7c0e0c24870de 100644
--- a/src/libraries/System.Linq.Parallel/Directory.Build.props
+++ b/src/libraries/System.Linq.Parallel/Directory.Build.props
@@ -2,5 +2,6 @@
Microsoft
+ browser
diff --git a/src/libraries/System.Net.Connections/Directory.Build.props b/src/libraries/System.Net.Connections/Directory.Build.props
index 63f02a0f817ef..0a5c8467bb6a9 100644
--- a/src/libraries/System.Net.Connections/Directory.Build.props
+++ b/src/libraries/System.Net.Connections/Directory.Build.props
@@ -2,5 +2,6 @@
Microsoft
+ browser
\ No newline at end of file
diff --git a/src/libraries/System.Net.Http.WinHttpHandler/ref/System.Net.Http.WinHttpHandler.cs b/src/libraries/System.Net.Http.WinHttpHandler/ref/System.Net.Http.WinHttpHandler.cs
index 7339effba4e25..12c86997fb1e0 100644
--- a/src/libraries/System.Net.Http.WinHttpHandler/ref/System.Net.Http.WinHttpHandler.cs
+++ b/src/libraries/System.Net.Http.WinHttpHandler/ref/System.Net.Http.WinHttpHandler.cs
@@ -44,6 +44,9 @@ public WinHttpHandler() { }
public System.Func? ServerCertificateValidationCallback { get { throw null; } set { } }
public System.Net.ICredentials? ServerCredentials { get { throw null; } set { } }
public System.Security.Authentication.SslProtocols SslProtocols { get { throw null; } set { } }
+ public bool TcpKeepAliveEnabled { get { throw null; } set { } }
+ public System.TimeSpan TcpKeepAliveTime { get { throw null; } set { } }
+ public System.TimeSpan TcpKeepAliveInterval { get { throw null; } set { } }
public System.Net.Http.WindowsProxyUsePolicy WindowsProxyUsePolicy { get { throw null; } set { } }
protected override void Dispose(bool disposing) { }
protected override System.Threading.Tasks.Task SendAsync(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) { throw null; }
diff --git a/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs b/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs
index b8d859e615b84..1525bc936e01d 100644
--- a/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs
+++ b/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs
@@ -76,6 +76,13 @@ private Func<
private TimeSpan _sendTimeout = TimeSpan.FromSeconds(30);
private TimeSpan _receiveHeadersTimeout = TimeSpan.FromSeconds(30);
private TimeSpan _receiveDataTimeout = TimeSpan.FromSeconds(30);
+
+ // Using OS defaults for "Keep-alive timeout" and "keep-alive interval"
+ // as documented in https://docs.microsoft.com/en-us/windows/win32/winsock/sio-keepalive-vals#remarks
+ private TimeSpan _tcpKeepAliveTime = TimeSpan.FromHours(2);
+ private TimeSpan _tcpKeepAliveInterval = TimeSpan.FromSeconds(1);
+ private bool _tcpKeepAliveEnabled;
+
private int _maxResponseHeadersLength = HttpHandlerDefaults.DefaultMaxResponseHeadersLength;
private int _maxResponseDrainSize = 64 * 1024;
private IDictionary _properties; // Only create dictionary when required.
@@ -188,6 +195,7 @@ public SslProtocols SslProtocols
}
}
+
public Func<
HttpRequestMessage,
X509Certificate2,
@@ -369,16 +377,13 @@ public TimeSpan SendTimeout
set
{
- if (value != Timeout.InfiniteTimeSpan && (value <= TimeSpan.Zero || value > s_maxTimeout))
- {
- throw new ArgumentOutOfRangeException(nameof(value));
- }
-
+ CheckTimeSpanPropertyValue(value);
CheckDisposedOrStarted();
_sendTimeout = value;
}
}
+
public TimeSpan ReceiveHeadersTimeout
{
get
@@ -388,11 +393,7 @@ public TimeSpan ReceiveHeadersTimeout
set
{
- if (value != Timeout.InfiniteTimeSpan && (value <= TimeSpan.Zero || value > s_maxTimeout))
- {
- throw new ArgumentOutOfRangeException(nameof(value));
- }
-
+ CheckTimeSpanPropertyValue(value);
CheckDisposedOrStarted();
_receiveHeadersTimeout = value;
}
@@ -407,16 +408,74 @@ public TimeSpan ReceiveDataTimeout
set
{
- if (value != Timeout.InfiniteTimeSpan && (value <= TimeSpan.Zero || value > s_maxTimeout))
- {
- throw new ArgumentOutOfRangeException(nameof(value));
- }
-
+ CheckTimeSpanPropertyValue(value);
CheckDisposedOrStarted();
_receiveDataTimeout = value;
}
}
+ ///
+ /// Gets or sets a value indicating whether TCP keep-alive is enabled.
+ ///
+ ///
+ /// If enabled, the values of and will be forwarded
+ /// to set WINHTTP_OPTION_TCP_KEEPALIVE, enabling and configuring TCP keep-alive for the backing TCP socket.
+ ///
+ public bool TcpKeepAliveEnabled
+ {
+ get
+ {
+ return _tcpKeepAliveEnabled;
+ }
+ set
+ {
+ CheckDisposedOrStarted();
+ _tcpKeepAliveEnabled = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the TCP keep-alive timeout.
+ ///
+ ///
+ /// Has no effect if is .
+ /// The default value of this property is 2 hours.
+ ///
+ public TimeSpan TcpKeepAliveTime
+ {
+ get
+ {
+ return _tcpKeepAliveTime;
+ }
+ set
+ {
+ CheckTimeSpanPropertyValue(value);
+ CheckDisposedOrStarted();
+ _tcpKeepAliveTime = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the TCP keep-alive interval.
+ ///
+ ///
+ /// Has no effect if is .
+ /// The default value of this property is 1 second.
+ ///
+ public TimeSpan TcpKeepAliveInterval
+ {
+ get
+ {
+ return _tcpKeepAliveInterval;
+ }
+ set
+ {
+ CheckTimeSpanPropertyValue(value);
+ CheckDisposedOrStarted();
+ _tcpKeepAliveInterval = value;
+ }
+ }
+
public int MaxResponseHeadersLength
{
get
@@ -936,6 +995,28 @@ private void SetSessionHandleOptions(SafeWinHttpHandle sessionHandle)
SetSessionHandleTlsOptions(sessionHandle);
SetSessionHandleTimeoutOptions(sessionHandle);
SetDisableHttp2StreamQueue(sessionHandle);
+ SetTcpKeepalive(sessionHandle);
+ }
+
+ private unsafe void SetTcpKeepalive(SafeWinHttpHandle sessionHandle)
+ {
+ if (_tcpKeepAliveEnabled)
+ {
+ var tcpKeepalive = new Interop.WinHttp.tcp_keepalive
+ {
+ onoff = 1,
+
+ // Timeout.InfiniteTimeSpan will be converted to uint.MaxValue milliseconds (~ 50 days)
+ keepaliveinterval = (uint)_tcpKeepAliveInterval.TotalMilliseconds,
+ keepalivetime = (uint)_tcpKeepAliveTime.TotalMilliseconds
+ };
+
+ SetWinHttpOption(
+ sessionHandle,
+ Interop.WinHttp.WINHTTP_OPTION_TCP_KEEPALIVE,
+ (IntPtr)(&tcpKeepalive),
+ (uint)sizeof(Interop.WinHttp.tcp_keepalive));
+ }
}
private void SetSessionHandleConnectionOptions(SafeWinHttpHandle sessionHandle)
@@ -1363,6 +1444,14 @@ private void CheckDisposedOrStarted()
}
}
+ private static void CheckTimeSpanPropertyValue(TimeSpan timeSpan)
+ {
+ if (timeSpan != Timeout.InfiniteTimeSpan && (timeSpan <= TimeSpan.Zero || timeSpan > s_maxTimeout))
+ {
+ throw new ArgumentOutOfRangeException("value");
+ }
+ }
+
private void SetStatusCallback(
SafeWinHttpHandle requestHandle,
Interop.WinHttp.WINHTTP_STATUS_CALLBACK callback)
diff --git a/src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/WinHttpHandlerTest.cs b/src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/WinHttpHandlerTest.cs
index 25c6afbc0f5f3..76efea2d3bb54 100644
--- a/src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/WinHttpHandlerTest.cs
+++ b/src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/WinHttpHandlerTest.cs
@@ -168,7 +168,6 @@ public async Task GetAsync_SetCookieContainerMultipleCookies_CookiesSent()
Assert.Equal("POST", responseContent.Method);
Assert.Equal(payload, responseContent.BodyContent);
Assert.Equal(cookies.ToDictionary(c => c.Name, c => c.Value), responseContent.Cookies);
-
};
}
@@ -218,6 +217,28 @@ public async Task SendAsync_MultipleHttp2ConnectionsEnabled_CreateAdditionalConn
}
}
+ [OuterLoop("Uses external service")]
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsWindows10Version2004OrGreater))]
+ public async Task SendAsync_UseTcpKeepAliveOptions()
+ {
+ using var handler = new WinHttpHandler()
+ {
+ TcpKeepAliveEnabled = true,
+ TcpKeepAliveTime = TimeSpan.FromSeconds(1),
+ TcpKeepAliveInterval = TimeSpan.FromMilliseconds(500)
+ };
+
+ using var client = new HttpClient(handler);
+
+ var response = client.GetAsync(System.Net.Test.Common.Configuration.Http.RemoteEchoServer).Result;
+ Assert.Equal(HttpStatusCode.OK, response.StatusCode);
+ string responseContent = await response.Content.ReadAsStringAsync();
+ _output.WriteLine(responseContent);
+
+ // Uncomment this to observe an exchange of "TCP Keep-Alive" and "TCP Keep-Alive ACK" packets:
+ // await Task.Delay(5000);
+ }
+
private async Task VerifyResponse(Task task, string payloadText)
{
Assert.True(task.IsCompleted);
diff --git a/src/libraries/System.Net.Http.WinHttpHandler/tests/UnitTests/APICallHistory.cs b/src/libraries/System.Net.Http.WinHttpHandler/tests/UnitTests/APICallHistory.cs
index 37f5d8c68d463..961cb2ffbad54 100644
--- a/src/libraries/System.Net.Http.WinHttpHandler/tests/UnitTests/APICallHistory.cs
+++ b/src/libraries/System.Net.Http.WinHttpHandler/tests/UnitTests/APICallHistory.cs
@@ -70,6 +70,8 @@ public static ProxyInfo RequestProxySettings
public static List WinHttpOptionClientCertContext { get { return winHttpOptionClientCertContextList; } }
+ public static (uint OnOff, uint KeepAliveTime, uint KeepAliveInterval)? WinHttpOptionTcpKeepAlive { get; set; }
+
public static void Reset()
{
sessionProxySettings.AccessType = null;
@@ -93,6 +95,7 @@ public static void Reset()
WinHttpOptionRedirectPolicy = null;
WinHttpOptionSendTimeout = null;
WinHttpOptionReceiveTimeout = null;
+ WinHttpOptionTcpKeepAlive = null;
winHttpOptionClientCertContextList.Clear();
}
diff --git a/src/libraries/System.Net.Http.WinHttpHandler/tests/UnitTests/FakeInterop.cs b/src/libraries/System.Net.Http.WinHttpHandler/tests/UnitTests/FakeInterop.cs
index 24e4b717859c2..a92c0124d9e5c 100644
--- a/src/libraries/System.Net.Http.WinHttpHandler/tests/UnitTests/FakeInterop.cs
+++ b/src/libraries/System.Net.Http.WinHttpHandler/tests/UnitTests/FakeInterop.cs
@@ -537,7 +537,7 @@ public static bool WinHttpSetOption(
return true;
}
- public static bool WinHttpSetOption(
+ public unsafe static bool WinHttpSetOption(
SafeWinHttpHandle handle,
uint option,
IntPtr optionData,
@@ -556,6 +556,11 @@ public static bool WinHttpSetOption(
{
APICallHistory.WinHttpOptionClientCertContext.Add(optionData);
}
+ else if (option == Interop.WinHttp.WINHTTP_OPTION_TCP_KEEPALIVE)
+ {
+ Interop.WinHttp.tcp_keepalive* ptr = (Interop.WinHttp.tcp_keepalive*)optionData;
+ APICallHistory.WinHttpOptionTcpKeepAlive = (ptr->onoff, ptr->keepalivetime, ptr->keepaliveinterval);
+ }
return true;
}
diff --git a/src/libraries/System.Net.Http.WinHttpHandler/tests/UnitTests/WinHttpHandlerTest.cs b/src/libraries/System.Net.Http.WinHttpHandler/tests/UnitTests/WinHttpHandlerTest.cs
index 32e87d56af648..0d7e4622d98d5 100644
--- a/src/libraries/System.Net.Http.WinHttpHandler/tests/UnitTests/WinHttpHandlerTest.cs
+++ b/src/libraries/System.Net.Http.WinHttpHandler/tests/UnitTests/WinHttpHandlerTest.cs
@@ -55,14 +55,112 @@ public void Ctor_ExpectedDefaultPropertyValues()
Assert.Null(handler.DefaultProxyCredentials);
Assert.Null(handler.Proxy);
Assert.Equal(int.MaxValue, handler.MaxConnectionsPerServer);
+
Assert.Equal(TimeSpan.FromSeconds(30), handler.SendTimeout);
Assert.Equal(TimeSpan.FromSeconds(30), handler.ReceiveHeadersTimeout);
Assert.Equal(TimeSpan.FromSeconds(30), handler.ReceiveDataTimeout);
+
+ Assert.False(handler.TcpKeepAliveEnabled);
+ Assert.Equal(TimeSpan.FromHours(2), handler.TcpKeepAliveTime);
+ Assert.Equal(TimeSpan.FromSeconds(1), handler.TcpKeepAliveInterval);
+
Assert.Equal(64, handler.MaxResponseHeadersLength);
Assert.Equal(64 * 1024, handler.MaxResponseDrainSize);
Assert.NotNull(handler.Properties);
}
+ [Fact]
+ public void SetInvalidTimeouts_ThrowsArgumentOutOfRangeException()
+ {
+ TimeSpan[] invalidIntervals =
+ {
+ TimeSpan.FromSeconds(-1),
+ TimeSpan.FromSeconds(0),
+ TimeSpan.FromSeconds(int.MaxValue)
+ };
+
+ var setters = new Action[]
+ {
+ (h, t) => h.SendTimeout = t,
+ (h, t) => h.ReceiveHeadersTimeout = t,
+ (h, t) => h.ReceiveDataTimeout = t,
+ (h, t) => h.TcpKeepAliveInterval = t,
+ (h, t) => h.TcpKeepAliveTime = t,
+ };
+
+ using var handler = new WinHttpHandler();
+
+ foreach (Action setter in setters)
+ {
+ foreach (TimeSpan invalid in invalidIntervals)
+ {
+ Assert.Throws(() => setter(handler, invalid));
+ }
+ }
+ }
+
+ [Fact]
+ public void TcpKeepAliveOptions_Roundtrip()
+ {
+ using var handler = new WinHttpHandler()
+ {
+ TcpKeepAliveEnabled = true,
+ TcpKeepAliveTime = TimeSpan.FromMinutes(42),
+ TcpKeepAliveInterval = TimeSpan.FromSeconds(13)
+ };
+
+ Assert.True(handler.TcpKeepAliveEnabled);
+ Assert.Equal(TimeSpan.FromMinutes(42), handler.TcpKeepAliveTime);
+ Assert.Equal(TimeSpan.FromSeconds(13), handler.TcpKeepAliveInterval);
+ }
+
+ [Fact]
+ public void TcpKeepalive_WhenDisabled_DoesntSetOptions()
+ {
+ using var handler = new WinHttpHandler();
+
+ SendRequestHelper.Send(
+ handler,
+ () => handler.TcpKeepAliveEnabled = false );
+ Assert.Null(APICallHistory.WinHttpOptionTcpKeepAlive);
+ }
+
+ [Fact]
+ public void TcpKeepalive_WhenEnabled_ForwardsCorrectNativeOptions()
+ {
+ using var handler = new WinHttpHandler();
+
+ SendRequestHelper.Send(handler, () => {
+ handler.TcpKeepAliveEnabled = true;
+ handler.TcpKeepAliveTime = TimeSpan.FromMinutes(13);
+ handler.TcpKeepAliveInterval = TimeSpan.FromSeconds(42);
+ });
+
+ (uint onOff, uint keepAliveTime, uint keepAliveInterval) = APICallHistory.WinHttpOptionTcpKeepAlive.Value;
+
+ Assert.True(onOff != 0);
+ Assert.Equal(13_000u * 60u, keepAliveTime);
+ Assert.Equal(42_000u, keepAliveInterval);
+ }
+
+ [Fact]
+ public void TcpKeepalive_InfiniteTimeSpan_TranslatesToUInt32MaxValue()
+ {
+ using var handler = new WinHttpHandler();
+
+ SendRequestHelper.Send(handler, () => {
+ handler.TcpKeepAliveEnabled = true;
+ handler.TcpKeepAliveTime = Timeout.InfiniteTimeSpan;
+ handler.TcpKeepAliveInterval = Timeout.InfiniteTimeSpan;
+ });
+
+ (uint onOff, uint keepAliveTime, uint keepAliveInterval) = APICallHistory.WinHttpOptionTcpKeepAlive.Value;
+
+ Assert.True(onOff != 0);
+ Assert.Equal(uint.MaxValue, keepAliveTime);
+ Assert.Equal(uint.MaxValue, keepAliveInterval);
+ }
+
[Fact]
public void AutomaticRedirection_SetFalseAndGet_ValueIsFalse()
{
diff --git a/src/libraries/System.Net.Http/ref/System.Net.Http.cs b/src/libraries/System.Net.Http/ref/System.Net.Http.cs
index 957f8f05e36c9..d38fc45156021 100644
--- a/src/libraries/System.Net.Http/ref/System.Net.Http.cs
+++ b/src/libraries/System.Net.Http/ref/System.Net.Http.cs
@@ -78,18 +78,18 @@ protected override void Dispose(bool disposing) { }
public System.Threading.Tasks.Task GetStringAsync(string? requestUri, System.Threading.CancellationToken cancellationToken) { throw null; }
public System.Threading.Tasks.Task GetStringAsync(System.Uri? requestUri) { throw null; }
public System.Threading.Tasks.Task GetStringAsync(System.Uri? requestUri, System.Threading.CancellationToken cancellationToken) { throw null; }
- public System.Threading.Tasks.Task PatchAsync(string? requestUri, System.Net.Http.HttpContent content) { throw null; }
- public System.Threading.Tasks.Task PatchAsync(string? requestUri, System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken) { throw null; }
- public System.Threading.Tasks.Task PatchAsync(System.Uri? requestUri, System.Net.Http.HttpContent content) { throw null; }
- public System.Threading.Tasks.Task PatchAsync(System.Uri? requestUri, System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken) { throw null; }
- public System.Threading.Tasks.Task PostAsync(string? requestUri, System.Net.Http.HttpContent content) { throw null; }
- public System.Threading.Tasks.Task PostAsync(string? requestUri, System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken) { throw null; }
- public System.Threading.Tasks.Task PostAsync(System.Uri? requestUri, System.Net.Http.HttpContent content) { throw null; }
- public System.Threading.Tasks.Task PostAsync(System.Uri? requestUri, System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken) { throw null; }
- public System.Threading.Tasks.Task PutAsync(string? requestUri, System.Net.Http.HttpContent content) { throw null; }
- public System.Threading.Tasks.Task PutAsync(string? requestUri, System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken) { throw null; }
- public System.Threading.Tasks.Task PutAsync(System.Uri? requestUri, System.Net.Http.HttpContent content) { throw null; }
- public System.Threading.Tasks.Task PutAsync(System.Uri? requestUri, System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken) { throw null; }
+ public System.Threading.Tasks.Task PatchAsync(string? requestUri, System.Net.Http.HttpContent? content) { throw null; }
+ public System.Threading.Tasks.Task PatchAsync(string? requestUri, System.Net.Http.HttpContent? content, System.Threading.CancellationToken cancellationToken) { throw null; }
+ public System.Threading.Tasks.Task PatchAsync(System.Uri? requestUri, System.Net.Http.HttpContent? content) { throw null; }
+ public System.Threading.Tasks.Task PatchAsync(System.Uri? requestUri, System.Net.Http.HttpContent? content, System.Threading.CancellationToken cancellationToken) { throw null; }
+ public System.Threading.Tasks.Task PostAsync(string? requestUri, System.Net.Http.HttpContent? content) { throw null; }
+ public System.Threading.Tasks.Task PostAsync(string? requestUri, System.Net.Http.HttpContent? content, System.Threading.CancellationToken cancellationToken) { throw null; }
+ public System.Threading.Tasks.Task PostAsync(System.Uri? requestUri, System.Net.Http.HttpContent? content) { throw null; }
+ public System.Threading.Tasks.Task PostAsync(System.Uri? requestUri, System.Net.Http.HttpContent? content, System.Threading.CancellationToken cancellationToken) { throw null; }
+ public System.Threading.Tasks.Task PutAsync(string? requestUri, System.Net.Http.HttpContent? content) { throw null; }
+ public System.Threading.Tasks.Task PutAsync(string? requestUri, System.Net.Http.HttpContent? content, System.Threading.CancellationToken cancellationToken) { throw null; }
+ public System.Threading.Tasks.Task PutAsync(System.Uri? requestUri, System.Net.Http.HttpContent? content) { throw null; }
+ public System.Threading.Tasks.Task PutAsync(System.Uri? requestUri, System.Net.Http.HttpContent? content, System.Threading.CancellationToken cancellationToken) { throw null; }
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
public System.Net.Http.HttpResponseMessage Send(System.Net.Http.HttpRequestMessage request) { throw null; }
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
@@ -118,6 +118,7 @@ public HttpClientHandler() { }
public System.Net.CookieContainer CookieContainer { get { throw null; } set { } }
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
public System.Net.ICredentials? Credentials { get { throw null; } set { } }
+ [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
public static System.Func DangerousAcceptAnyServerCertificateValidator { get { throw null; } }
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
public System.Net.ICredentials? DefaultProxyCredentials { get { throw null; } set { } }
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 febae717a7fe9..13f7c272624ef 100644
--- a/src/libraries/System.Net.Http/src/System.Net.Http.csproj
+++ b/src/libraries/System.Net.Http/src/System.Net.Http.csproj
@@ -1,9 +1,9 @@
-
+
win
true
$(DefineConstants);HTTP_DLL
- $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-FreeBSD;$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent)-Browser
+ $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-FreeBSD;$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent)-Browser;$(NetCoreAppCurrent)-illumos;$(NetCoreAppCurrent)-Solaris
enable
@@ -106,8 +106,6 @@
-
+
+
+
diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/HttpTelemetry.Browser.cs b/src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/HttpTelemetry.Browser.cs
new file mode 100644
index 0000000000000..406afd10a87a0
--- /dev/null
+++ b/src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/HttpTelemetry.Browser.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.Tracing;
+
+namespace System.Net.Http
+{
+ internal sealed partial class HttpTelemetry
+ {
+ public void Http11RequestLeftQueue(double timeOnQueueMilliseconds)
+ {
+ }
+
+ public void Http20RequestLeftQueue(double timeOnQueueMilliseconds)
+ {
+ }
+
+ protected override void OnEventCommand(EventCommandEventArgs command)
+ {
+ }
+ }
+}
diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/Headers/AltSvcHeaderParser.cs b/src/libraries/System.Net.Http/src/System/Net/Http/Headers/AltSvcHeaderParser.cs
index 35c98f80b66e3..f6c65298d179a 100644
--- a/src/libraries/System.Net.Http/src/System/Net/Http/Headers/AltSvcHeaderParser.cs
+++ b/src/libraries/System.Net.Http/src/System/Net/Http/Headers/AltSvcHeaderParser.cs
@@ -1,15 +1,9 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-using System;
-using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
-using System.Linq;
-using System.Resources;
using System.Text;
-using System.Threading;
-using System.Threading.Tasks;
namespace System.Net.Http.Headers
{
diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/HttpClient.cs b/src/libraries/System.Net.Http/src/System/Net/Http/HttpClient.cs
index 0a9aa07790909..5b81865157e05 100644
--- a/src/libraries/System.Net.Http/src/System/Net/Http/HttpClient.cs
+++ b/src/libraries/System.Net.Http/src/System/Net/Http/HttpClient.cs
@@ -376,48 +376,48 @@ public Task GetAsync(string? requestUri, HttpCompletionOpti
public Task GetAsync(Uri? requestUri, HttpCompletionOption completionOption, CancellationToken cancellationToken) =>
SendAsync(CreateRequestMessage(HttpMethod.Get, requestUri), completionOption, cancellationToken);
- public Task PostAsync(string? requestUri, HttpContent content) =>
+ public Task PostAsync(string? requestUri, HttpContent? content) =>
PostAsync(CreateUri(requestUri), content);
- public Task PostAsync(Uri? requestUri, HttpContent content) =>
+ public Task PostAsync(Uri? requestUri, HttpContent? content) =>
PostAsync(requestUri, content, CancellationToken.None);
- public Task PostAsync(string? requestUri, HttpContent content, CancellationToken cancellationToken) =>
+ public Task PostAsync(string? requestUri, HttpContent? content, CancellationToken cancellationToken) =>
PostAsync(CreateUri(requestUri), content, cancellationToken);
- public Task PostAsync(Uri? requestUri, HttpContent content, CancellationToken cancellationToken)
+ public Task PostAsync(Uri? requestUri, HttpContent? content, CancellationToken cancellationToken)
{
HttpRequestMessage request = CreateRequestMessage(HttpMethod.Post, requestUri);
request.Content = content;
return SendAsync(request, cancellationToken);
}
- public Task PutAsync(string? requestUri, HttpContent content) =>
+ public Task PutAsync(string? requestUri, HttpContent? content) =>
PutAsync(CreateUri(requestUri), content);
- public Task PutAsync(Uri? requestUri, HttpContent content) =>
+ public Task PutAsync(Uri? requestUri, HttpContent? content) =>
PutAsync(requestUri, content, CancellationToken.None);
- public Task PutAsync(string? requestUri, HttpContent content, CancellationToken cancellationToken) =>
+ public Task PutAsync(string? requestUri, HttpContent? content, CancellationToken cancellationToken) =>
PutAsync(CreateUri(requestUri), content, cancellationToken);
- public Task PutAsync(Uri? requestUri, HttpContent content, CancellationToken cancellationToken)
+ public Task PutAsync(Uri? requestUri, HttpContent? content, CancellationToken cancellationToken)
{
HttpRequestMessage request = CreateRequestMessage(HttpMethod.Put, requestUri);
request.Content = content;
return SendAsync(request, cancellationToken);
}
- public Task PatchAsync(string? requestUri, HttpContent content) =>
+ public Task PatchAsync(string? requestUri, HttpContent? content) =>
PatchAsync(CreateUri(requestUri), content);
- public Task PatchAsync(Uri? requestUri, HttpContent content) =>
+ public Task PatchAsync(Uri? requestUri, HttpContent? content) =>
PatchAsync(requestUri, content, CancellationToken.None);
- public Task PatchAsync(string? requestUri, HttpContent content, CancellationToken cancellationToken) =>
+ public Task PatchAsync(string? requestUri, HttpContent? content, CancellationToken cancellationToken) =>
PatchAsync(CreateUri(requestUri), content, cancellationToken);
- public Task PatchAsync(Uri? requestUri, HttpContent content, CancellationToken cancellationToken)
+ public Task PatchAsync(Uri? requestUri, HttpContent? content, CancellationToken cancellationToken)
{
HttpRequestMessage request = CreateRequestMessage(HttpMethod.Patch, requestUri);
request.Content = content;
@@ -511,7 +511,9 @@ private async ValueTask SendAsyncCore(
// Wait for the send request to complete, getting back the response.
response = async ?
await base.SendAsync(request, cts.Token).ConfigureAwait(false) :
+#pragma warning disable CA1416 // Validate platform compatibility, not supported on browser, safe to suppress
base.Send(request, cts.Token);
+#pragma warning restore CA1416
ThrowForNullResponse(response);
// Buffer the response content if we've been asked to.
diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/HttpClientHandler.cs b/src/libraries/System.Net.Http/src/System/Net/Http/HttpClientHandler.cs
index 81de5ba140afe..2e3289643cfbe 100644
--- a/src/libraries/System.Net.Http/src/System/Net/Http/HttpClientHandler.cs
+++ b/src/libraries/System.Net.Http/src/System/Net/Http/HttpClientHandler.cs
@@ -306,6 +306,7 @@ protected internal override Task SendAsync(HttpRequestMessa
// lazy-load the validator func so it can be trimmed by the ILLinker if it isn't used.
private static Func? s_dangerousAcceptAnyServerCertificateValidator;
+ [UnsupportedOSPlatform("browser")]
public static Func DangerousAcceptAnyServerCertificateValidator =>
Volatile.Read(ref s_dangerousAcceptAnyServerCertificateValidator) ??
Interlocked.CompareExchange(ref s_dangerousAcceptAnyServerCertificateValidator, delegate { return true; }, null) ??
diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/HttpTelemetry.AnyOS.cs b/src/libraries/System.Net.Http/src/System/Net/Http/HttpTelemetry.AnyOS.cs
new file mode 100644
index 0000000000000..0a7e908bf0c31
--- /dev/null
+++ b/src/libraries/System.Net.Http/src/System/Net/Http/HttpTelemetry.AnyOS.cs
@@ -0,0 +1,104 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Diagnostics;
+using System.Diagnostics.Tracing;
+using System.Threading;
+
+namespace System.Net.Http
+{
+ internal sealed partial class HttpTelemetry
+ {
+ private IncrementingPollingCounter? _startedRequestsPerSecondCounter;
+ private IncrementingPollingCounter? _failedRequestsPerSecondCounter;
+ private PollingCounter? _startedRequestsCounter;
+ private PollingCounter? _currentRequestsCounter;
+ private PollingCounter? _failedRequestsCounter;
+ private PollingCounter? _totalHttp11ConnectionsCounter;
+ private PollingCounter? _totalHttp20ConnectionsCounter;
+ private EventCounter? _http11RequestsQueueDurationCounter;
+ private EventCounter? _http20RequestsQueueDurationCounter;
+
+ [NonEvent]
+ public void Http11RequestLeftQueue(double timeOnQueueMilliseconds)
+ {
+ _http11RequestsQueueDurationCounter!.WriteMetric(timeOnQueueMilliseconds);
+ RequestLeftQueue(timeOnQueueMilliseconds, versionMajor: 1, versionMinor: 1);
+ }
+
+ [NonEvent]
+ public void Http20RequestLeftQueue(double timeOnQueueMilliseconds)
+ {
+ _http20RequestsQueueDurationCounter!.WriteMetric(timeOnQueueMilliseconds);
+ RequestLeftQueue(timeOnQueueMilliseconds, versionMajor: 2, versionMinor: 0);
+ }
+
+ protected override void OnEventCommand(EventCommandEventArgs command)
+ {
+ if (command.Command == EventCommand.Enable)
+ {
+ // This is the convention for initializing counters in the RuntimeEventSource (lazily on the first enable command).
+ // They aren't disabled afterwards...
+
+ // The cumulative number of HTTP requests started since the process started.
+ _startedRequestsCounter ??= new PollingCounter("requests-started", this, () => Interlocked.Read(ref _startedRequests))
+ {
+ DisplayName = "Requests Started",
+ };
+
+ // The number of HTTP requests started per second since the process started.
+ _startedRequestsPerSecondCounter ??= new IncrementingPollingCounter("requests-started-rate", this, () => Interlocked.Read(ref _startedRequests))
+ {
+ DisplayName = "Requests Started Rate",
+ DisplayRateTimeScale = TimeSpan.FromSeconds(1)
+ };
+
+ // The cumulative number of HTTP requests failed since the process started.
+ // Failed means that an exception occurred during the handler's Send(Async) call as a result of a connection related error, timeout, or explicitly cancelled.
+ // In case of using HttpClient's SendAsync(and friends) with buffering, this includes exceptions that occured while buffering the response content
+ // In case of using HttpClient's helper methods (GetString/ByteArray/Stream), this includes responses with non-success status codes
+ _failedRequestsCounter ??= new PollingCounter("requests-failed", this, () => Interlocked.Read(ref _failedRequests))
+ {
+ DisplayName = "Requests Failed"
+ };
+
+ // The number of HTTP requests failed per second since the process started.
+ _failedRequestsPerSecondCounter ??= new IncrementingPollingCounter("requests-failed-rate", this, () => Interlocked.Read(ref _failedRequests))
+ {
+ DisplayName = "Requests Failed Rate",
+ DisplayRateTimeScale = TimeSpan.FromSeconds(1)
+ };
+
+ // The current number of active HTTP requests that have started but not yet completed or failed.
+ // Use (-_stoppedRequests + _startedRequests) to avoid returning a negative value if _stoppedRequests is
+ // incremented after reading _startedRequests due to race conditions with completing the HTTP request.
+ _currentRequestsCounter ??= new PollingCounter("current-requests", this, () => -Interlocked.Read(ref _stoppedRequests) + Interlocked.Read(ref _startedRequests))
+ {
+ DisplayName = "Current Requests"
+ };
+
+ _totalHttp11ConnectionsCounter ??= new PollingCounter("http11-connections-current-total", this, () => Interlocked.Read(ref _openedHttp11Connections))
+ {
+ DisplayName = "Current Http 1.1 Connections"
+ };
+
+ _totalHttp20ConnectionsCounter ??= new PollingCounter("http20-connections-current-total", this, () => Interlocked.Read(ref _openedHttp20Connections))
+ {
+ DisplayName = "Current Http 2.0 Connections"
+ };
+
+ _http11RequestsQueueDurationCounter ??= new EventCounter("http11-requests-queue-duration", this)
+ {
+ DisplayName = "HTTP 1.1 Requests Queue Duration",
+ DisplayUnits = "ms"
+ };
+
+ _http20RequestsQueueDurationCounter ??= new EventCounter("http20-requests-queue-duration", this)
+ {
+ DisplayName = "HTTP 2.0 Requests Queue Duration",
+ DisplayUnits = "ms"
+ };
+ }
+ }
+ }
+}
diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/HttpTelemetry.cs b/src/libraries/System.Net.Http/src/System/Net/Http/HttpTelemetry.cs
index 5879581504f45..385d959770732 100644
--- a/src/libraries/System.Net.Http/src/System/Net/Http/HttpTelemetry.cs
+++ b/src/libraries/System.Net.Http/src/System/Net/Http/HttpTelemetry.cs
@@ -8,20 +8,10 @@
namespace System.Net.Http
{
[EventSource(Name = "System.Net.Http")]
- internal sealed class HttpTelemetry : EventSource
+ internal sealed partial class HttpTelemetry : EventSource
{
public static readonly HttpTelemetry Log = new HttpTelemetry();
- private IncrementingPollingCounter? _startedRequestsPerSecondCounter;
- private IncrementingPollingCounter? _failedRequestsPerSecondCounter;
- private PollingCounter? _startedRequestsCounter;
- private PollingCounter? _currentRequestsCounter;
- private PollingCounter? _failedRequestsCounter;
- private PollingCounter? _totalHttp11ConnectionsCounter;
- private PollingCounter? _totalHttp20ConnectionsCounter;
- private EventCounter? _http11RequestsQueueDurationCounter;
- private EventCounter? _http20RequestsQueueDurationCounter;
-
private long _startedRequests;
private long _stoppedRequests;
private long _failedRequests;
@@ -168,88 +158,6 @@ public void Http20ConnectionClosed()
ConnectionClosed(versionMajor: 2, versionMinor: 0);
}
- [NonEvent]
- public void Http11RequestLeftQueue(double timeOnQueueMilliseconds)
- {
- _http11RequestsQueueDurationCounter!.WriteMetric(timeOnQueueMilliseconds);
- RequestLeftQueue(timeOnQueueMilliseconds, versionMajor: 1, versionMinor: 1);
- }
-
- [NonEvent]
- public void Http20RequestLeftQueue(double timeOnQueueMilliseconds)
- {
- _http20RequestsQueueDurationCounter!.WriteMetric(timeOnQueueMilliseconds);
- RequestLeftQueue(timeOnQueueMilliseconds, versionMajor: 2, versionMinor: 0);
- }
-
- protected override void OnEventCommand(EventCommandEventArgs command)
- {
- if (command.Command == EventCommand.Enable)
- {
- // This is the convention for initializing counters in the RuntimeEventSource (lazily on the first enable command).
- // They aren't disabled afterwards...
-
- // The cumulative number of HTTP requests started since the process started.
- _startedRequestsCounter ??= new PollingCounter("requests-started", this, () => Interlocked.Read(ref _startedRequests))
- {
- DisplayName = "Requests Started",
- };
-
- // The number of HTTP requests started per second since the process started.
- _startedRequestsPerSecondCounter ??= new IncrementingPollingCounter("requests-started-rate", this, () => Interlocked.Read(ref _startedRequests))
- {
- DisplayName = "Requests Started Rate",
- DisplayRateTimeScale = TimeSpan.FromSeconds(1)
- };
-
- // The cumulative number of HTTP requests failed since the process started.
- // Failed means that an exception occurred during the handler's Send(Async) call as a result of a connection related error, timeout, or explicitly cancelled.
- // In case of using HttpClient's SendAsync(and friends) with buffering, this includes exceptions that occured while buffering the response content
- // In case of using HttpClient's helper methods (GetString/ByteArray/Stream), this includes responses with non-success status codes
- _failedRequestsCounter ??= new PollingCounter("requests-failed", this, () => Interlocked.Read(ref _failedRequests))
- {
- DisplayName = "Requests Failed"
- };
-
- // The number of HTTP requests failed per second since the process started.
- _failedRequestsPerSecondCounter ??= new IncrementingPollingCounter("requests-failed-rate", this, () => Interlocked.Read(ref _failedRequests))
- {
- DisplayName = "Requests Failed Rate",
- DisplayRateTimeScale = TimeSpan.FromSeconds(1)
- };
-
- // The current number of active HTTP requests that have started but not yet completed or failed.
- // Use (-_stoppedRequests + _startedRequests) to avoid returning a negative value if _stoppedRequests is
- // incremented after reading _startedRequests due to race conditions with completing the HTTP request.
- _currentRequestsCounter ??= new PollingCounter("current-requests", this, () => -Interlocked.Read(ref _stoppedRequests) + Interlocked.Read(ref _startedRequests))
- {
- DisplayName = "Current Requests"
- };
-
- _totalHttp11ConnectionsCounter ??= new PollingCounter("http11-connections-current-total", this, () => Interlocked.Read(ref _openedHttp11Connections))
- {
- DisplayName = "Current Http 1.1 Connections"
- };
-
- _totalHttp20ConnectionsCounter ??= new PollingCounter("http20-connections-current-total", this, () => Interlocked.Read(ref _openedHttp20Connections))
- {
- DisplayName = "Current Http 2.0 Connections"
- };
-
- _http11RequestsQueueDurationCounter ??= new EventCounter("http11-requests-queue-duration", this)
- {
- DisplayName = "HTTP 1.1 Requests Queue Duration",
- DisplayUnits = "ms"
- };
-
- _http20RequestsQueueDurationCounter ??= new EventCounter("http20-requests-queue-duration", this)
- {
- DisplayName = "HTTP 2.0 Requests Queue Duration",
- DisplayUnits = "ms"
- };
- }
- }
-
[NonEvent]
private unsafe void WriteEvent(int eventId, string? arg1, string? arg2, int arg3, string? arg4, byte arg5, byte arg6, HttpVersionPolicy arg7)
{
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 d9f03e9e073fb..eefd608dfc0e6 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
@@ -743,7 +743,7 @@ private void BufferBytes(ReadOnlySpan span)
_recvBuffer.Discard(bytesRead);
- if (NetEventSource.IsEnabled)
+ if (NetEventSource.Log.IsEnabled())
{
Trace($"Received frame {frameType} of length {payloadLength}.");
}
diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs
index 040558f36bfcd..12db501f35728 100644
--- a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs
+++ b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs
@@ -1657,6 +1657,7 @@ public static IEnumerable KeepAliveTestDataSource()
[OuterLoop("Significant delay.")]
[MemberData(nameof(KeepAliveTestDataSource))]
[ConditionalTheory(nameof(SupportsAlpn))]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/41929")]
public async Task Http2_PingKeepAlive(TimeSpan keepAlivePingDelay, HttpKeepAlivePingPolicy keepAlivePingPolicy, bool expectRequestFail)
{
TimeSpan pingTimeout = TimeSpan.FromSeconds(5);
diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs
index 84147ead726c7..186358ac425ec 100644
--- a/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs
+++ b/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs
@@ -2073,6 +2073,7 @@ public async Task Http2_MultipleConnectionsEnabled_ConnectionLimitNotReached_Con
}
[ConditionalFact(nameof(SupportsAlpn))]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/45204")]
public async Task Http2_MultipleConnectionsEnabled_InfiniteRequestsCompletelyBlockOneConnection_RemaningRequestsAreHandledByNewConnection()
{
const int MaxConcurrentStreams = 2;
@@ -2096,7 +2097,7 @@ public async Task Http2_MultipleConnectionsEnabled_InfiniteRequestsCompletelyBlo
Assert.Equal(MaxConcurrentStreams, handledRequestCount);
- //Complete inifinite requests.
+ // Complete infinite requests.
handledRequestCount = await SendResponses(connection0, blockedStreamIds);
Assert.Equal(MaxConcurrentStreams, handledRequestCount);
@@ -2209,7 +2210,7 @@ public async Task Http2_MultipleConnectionsEnabled_IdleConnectionTimeoutExpired_
Assert.True(connection1.IsInvalid);
Assert.False(connection0.IsInvalid);
- Http2LoopbackConnection connection2 = await PrepareConnection(server, client, MaxConcurrentStreams, readTimeout: 15, expectedWarpUpTasks:2).ConfigureAwait(false);
+ Http2LoopbackConnection connection2 = await PrepareConnection(server, client, MaxConcurrentStreams, readTimeout: 15, expectedWarmUpTasks:2).ConfigureAwait(false);
AcquireAllStreamSlots(server, client, sendTasks, MaxConcurrentStreams);
@@ -2243,7 +2244,7 @@ private async Task VerifySendTasks(IReadOnlyList> send
SslOptions = { RemoteCertificateValidationCallback = delegate { return true; } }
};
- private async Task PrepareConnection(Http2LoopbackServer server, HttpClient client, uint maxConcurrentStreams, int readTimeout = 3, int expectedWarpUpTasks = 1)
+ private async Task PrepareConnection(Http2LoopbackServer server, HttpClient client, uint maxConcurrentStreams, int readTimeout = 3, int expectedWarmUpTasks = 1)
{
Task warmUpTask = client.GetAsync(server.Address);
Http2LoopbackConnection connection = await GetConnection(server, maxConcurrentStreams, readTimeout).TimeoutAfter(TestHelper.PassingTestTimeoutMilliseconds * 2).ConfigureAwait(false);
@@ -2251,7 +2252,7 @@ private async Task PrepareConnection(Http2LoopbackServe
Task settingAckReceived = connection.SettingAckWaiter;
while (true)
{
- Task handleRequestTask = HandleAllPendingRequests(connection, expectedWarpUpTasks);
+ Task handleRequestTask = HandleAllPendingRequests(connection, expectedWarmUpTasks);
await Task.WhenAll(warmUpTask, handleRequestTask).TimeoutAfter(TestHelper.PassingTestTimeoutMilliseconds * 2).ConfigureAwait(false);
Assert.True(warmUpTask.Result.IsSuccessStatusCode);
warmUpTask.Result.Dispose();
diff --git a/src/libraries/System.Net.NameResolution/src/System/Net/NameResolutionPal.Windows.cs b/src/libraries/System.Net.NameResolution/src/System/Net/NameResolutionPal.Windows.cs
index 3cdf343afa199..e9dd2d81851c8 100644
--- a/src/libraries/System.Net.NameResolution/src/System/Net/NameResolutionPal.Windows.cs
+++ b/src/libraries/System.Net.NameResolution/src/System/Net/NameResolutionPal.Windows.cs
@@ -412,7 +412,7 @@ public void RegisterForCancellation(CancellationToken cancellationToken)
}
}
- if (cancelResult != 0 && cancelResult != Interop.Winsock.WSA_INVALID_HANDLE && NetEventSource.IsEnabled)
+ if (cancelResult != 0 && cancelResult != Interop.Winsock.WSA_INVALID_HANDLE && NetEventSource.Log.IsEnabled())
{
NetEventSource.Info(@this, $"GetAddrInfoExCancel returned error {cancelResult}");
}
diff --git a/src/libraries/System.Net.NetworkInformation/src/System.Net.NetworkInformation.csproj b/src/libraries/System.Net.NetworkInformation/src/System.Net.NetworkInformation.csproj
index ae6fb33863f0c..be99640d82855 100644
--- a/src/libraries/System.Net.NetworkInformation/src/System.Net.NetworkInformation.csproj
+++ b/src/libraries/System.Net.NetworkInformation/src/System.Net.NetworkInformation.csproj
@@ -1,7 +1,7 @@
true
- $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent)-Browser;$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent)-FreeBSD
+ $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent)-Browser;$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent)-FreeBSD;$(NetCoreAppCurrent)-illumos;$(NetCoreAppCurrent)-Solaris
enable
@@ -181,7 +181,7 @@
-
+
diff --git a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.UnknownUnix.cs b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.UnknownUnix.cs
index d22aa8b3a4af5..cac7dc0a66010 100644
--- a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.UnknownUnix.cs
+++ b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.UnknownUnix.cs
@@ -1,10 +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.Collections.Generic;
+using System.Threading;
+
namespace System.Net.NetworkInformation
{
public partial class NetworkChange
{
+ static NetworkChange()
+ {
+ // fake usage of static readonly fields to avoid getting CA1823 warning when we are compiling this partial.
+ var addressChangedSubscribers = new Dictionary(s_addressChangedSubscribers);
+ var availabilityChangedSubscribers = new Dictionary(s_availabilityChangedSubscribers);
+ NetworkAvailabilityEventArgs args = addressChangedSubscribers.Count > 0 ? s_availableEventArgs : s_notAvailableEventArgs;
+ ContextCallback callbackContext = s_runAddressChangedHandler != null ? s_runHandlerAvailable : s_runHandlerNotAvailable;
+ }
+
public static event NetworkAddressChangedEventHandler? NetworkAddressChanged
{
add { throw new PlatformNotSupportedException(); }
diff --git a/src/libraries/System.Net.Primitives/src/System/Net/CookieContainer.cs b/src/libraries/System.Net.Primitives/src/System/Net/CookieContainer.cs
index 9728030b8cd4d..e64873c04f61c 100644
--- a/src/libraries/System.Net.Primitives/src/System/Net/CookieContainer.cs
+++ b/src/libraries/System.Net.Primitives/src/System/Net/CookieContainer.cs
@@ -5,8 +5,6 @@
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
-using System.IO;
-using System.Linq;
using System.Net.NetworkInformation;
using System.Text;
diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/MsQuicStream.cs b/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/MsQuicStream.cs
index 0069a234b92a6..5379f1ff1ce00 100644
--- a/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/MsQuicStream.cs
+++ b/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/MsQuicStream.cs
@@ -225,7 +225,7 @@ internal override async ValueTask ReadAsync(Memory destination, Cance
throw new InvalidOperationException("Reading is not allowed on stream.");
}
- if (NetEventSource.IsEnabled)
+ if (NetEventSource.Log.IsEnabled())
{
NetEventSource.Info(this, $"[{GetHashCode()}] reading into Memory of '{destination.Length}' bytes.");
}
@@ -479,7 +479,7 @@ private static uint NativeCallbackHandler(
private uint HandleEvent(ref StreamEvent evt)
{
- if (NetEventSource.IsEnabled)
+ if (NetEventSource.Log.IsEnabled())
{
NetEventSource.Info(this, $"[{GetHashCode()}] handling event '{evt.Type}'.");
}
diff --git a/src/libraries/System.Net.Security/src/System/Net/Security/SslStreamCertificateContext.Windows.cs b/src/libraries/System.Net.Security/src/System/Net/Security/SslStreamCertificateContext.Windows.cs
index 0827eca16d572..fcb84b2dda6a0 100644
--- a/src/libraries/System.Net.Security/src/System/Net/Security/SslStreamCertificateContext.Windows.cs
+++ b/src/libraries/System.Net.Security/src/System/Net/Security/SslStreamCertificateContext.Windows.cs
@@ -62,7 +62,7 @@ private SslStreamCertificateContext(X509Certificate2 target, X509Certificate2[]
{
store.Dispose();
store = null;
- if (NetEventSource.IsEnabled)
+ if (NetEventSource.Log.IsEnabled())
{
NetEventSource.Error(this, $"Failed to open certificate store for intermediates.");
}
diff --git a/src/libraries/System.Net.Security/src/System/Net/Security/SslStreamCertificateContext.cs b/src/libraries/System.Net.Security/src/System/Net/Security/SslStreamCertificateContext.cs
index 4cba3232be530..37f3e03eee1ef 100644
--- a/src/libraries/System.Net.Security/src/System/Net/Security/SslStreamCertificateContext.cs
+++ b/src/libraries/System.Net.Security/src/System/Net/Security/SslStreamCertificateContext.cs
@@ -33,7 +33,7 @@ public static SslStreamCertificateContext Create(X509Certificate2 target, X509Ce
chain.ChainPolicy.DisableCertificateDownloads = offline;
bool chainStatus = chain.Build(target);
- if (!chainStatus && NetEventSource.IsEnabled)
+ if (!chainStatus && NetEventSource.Log.IsEnabled())
{
NetEventSource.Error(null, $"Failed to build chain for {target.Subject}");
}
diff --git a/src/libraries/System.Net.Security/src/System/Net/Security/SslStreamPal.Windows.cs b/src/libraries/System.Net.Security/src/System/Net/Security/SslStreamPal.Windows.cs
index 89b474fe4bf48..b93e89957bc76 100644
--- a/src/libraries/System.Net.Security/src/System/Net/Security/SslStreamPal.Windows.cs
+++ b/src/libraries/System.Net.Security/src/System/Net/Security/SslStreamPal.Windows.cs
@@ -216,7 +216,7 @@ public static unsafe SafeFreeCredentials AcquireCredentialsHandleSchCredentials(
credential.paCred = &certificateHandle;
}
- if (NetEventSource.IsEnabled) NetEventSource.Info($"flags=({flags}), ProtocolFlags=({protocolFlags}), EncryptionPolicy={policy}");
+ if (NetEventSource.Log.IsEnabled()) NetEventSource.Info($"flags=({flags}), ProtocolFlags=({protocolFlags}), EncryptionPolicy={policy}");
if (protocolFlags != 0)
{
diff --git a/src/libraries/System.Net.ServicePoint/ref/System.Net.ServicePoint.cs b/src/libraries/System.Net.ServicePoint/ref/System.Net.ServicePoint.cs
index d7adfc5a1484e..f26d234238f72 100644
--- a/src/libraries/System.Net.ServicePoint/ref/System.Net.ServicePoint.cs
+++ b/src/libraries/System.Net.ServicePoint/ref/System.Net.ServicePoint.cs
@@ -48,6 +48,7 @@ internal ServicePointManager() { }
public static int DefaultConnectionLimit { get { throw null; } set { } }
public static int DnsRefreshTimeout { get { throw null; } set { } }
public static bool EnableDnsRoundRobin { get { throw null; } set { } }
+ [System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static System.Net.Security.EncryptionPolicy EncryptionPolicy { get { throw null; } }
public static bool Expect100Continue { get { throw null; } set { } }
public static int MaxServicePointIdleTime { get { throw null; } set { } }
diff --git a/src/libraries/System.Net.ServicePoint/src/System/Net/ServicePointManager.cs b/src/libraries/System.Net.ServicePoint/src/System/Net/ServicePointManager.cs
index 267610d2d675f..eb278644472e5 100644
--- a/src/libraries/System.Net.ServicePoint/src/System/Net/ServicePointManager.cs
+++ b/src/libraries/System.Net.ServicePoint/src/System/Net/ServicePointManager.cs
@@ -4,6 +4,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Net.Security;
+using System.Runtime.Versioning;
using System.Threading;
namespace System.Net
@@ -102,6 +103,7 @@ public static int DnsRefreshTimeout
public static bool CheckCertificateRevocationList { get; set; }
+ [UnsupportedOSPlatform("browser")]
public static EncryptionPolicy EncryptionPolicy { get; } = EncryptionPolicy.RequireEncryption;
[Obsolete(Obsoletions.WebRequestMessage, DiagnosticId = Obsoletions.WebRequestDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
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 89a9bfffb1bc9..bda1217e01f20 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
@@ -813,11 +813,17 @@ caughtException is OperationCanceledException ||
}
// Complete the operation.
- if (SocketsTelemetry.Log.IsEnabled() && !_disableTelemetry) LogBytesTransferEvents(_connectSocket?.SocketType, SocketAsyncOperation.Connect, internalArgs.BytesTransferred);
+ if (SocketsTelemetry.Log.IsEnabled() && !_disableTelemetry)
+ {
+ LogBytesTransferEvents(_connectSocket?.SocketType, SocketAsyncOperation.Connect, internalArgs.BytesTransferred);
+ AfterConnectAcceptTelemetry();
+ }
Complete();
- // If the caller is treating this operation as pending, own the completion.
+ // Clean up after our temporary arguments.
internalArgs.Dispose();
+
+ // If the caller is treating this operation as pending, own the completion.
if (!internalArgs.ReachedCoordinationPointFirst())
{
// Regardless of _flowExecutionContext, context will have been flown through this async method, as that's part
@@ -825,7 +831,7 @@ caughtException is OperationCanceledException ||
// the completion callback. This method may have even mutated the ExecutionContext, in which case for telemetry
// we need those mutations to be surfaced as part of this callback, so that logging performed here sees those
// mutations (e.g. to the current Activity).
- OnCompletedInternal();
+ OnCompleted(this);
}
}
}
diff --git a/src/libraries/System.Net.WebHeaderCollection/src/System.Net.WebHeaderCollection.csproj b/src/libraries/System.Net.WebHeaderCollection/src/System.Net.WebHeaderCollection.csproj
index 3d060d6ebc3c6..d52760c4c646b 100644
--- a/src/libraries/System.Net.WebHeaderCollection/src/System.Net.WebHeaderCollection.csproj
+++ b/src/libraries/System.Net.WebHeaderCollection/src/System.Net.WebHeaderCollection.csproj
@@ -23,7 +23,6 @@
-
diff --git a/src/libraries/System.Net.WebHeaderCollection/src/System/Net/HeaderInfoTable.cs b/src/libraries/System.Net.WebHeaderCollection/src/System/Net/HeaderInfoTable.cs
index c0a7f92ac8e15..4e23fcc418aee 100644
--- a/src/libraries/System.Net.WebHeaderCollection/src/System/Net/HeaderInfoTable.cs
+++ b/src/libraries/System.Net.WebHeaderCollection/src/System/Net/HeaderInfoTable.cs
@@ -4,7 +4,6 @@
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
-using System.Linq;
namespace System.Net
{
diff --git a/src/libraries/System.Net.WebProxy/src/System/Net/WebProxy.cs b/src/libraries/System.Net.WebProxy/src/System/Net/WebProxy.cs
index b853be87dadef..a5db1a07205d8 100644
--- a/src/libraries/System.Net.WebProxy/src/System/Net/WebProxy.cs
+++ b/src/libraries/System.Net.WebProxy/src/System/Net/WebProxy.cs
@@ -6,6 +6,7 @@
using System.Globalization;
using System.Net.NetworkInformation;
using System.Runtime.Serialization;
+using System.Runtime.Versioning;
using System.Text.RegularExpressions;
namespace System.Net
@@ -160,6 +161,7 @@ private bool IsLocal(Uri host)
string hostString = host.Host;
+#pragma warning disable CA1416 // Validate platform compatibility, issue: https://github.com/dotnet/runtime/issues/43751
if (IPAddress.TryParse(hostString, out IPAddress? hostAddress))
{
return IPAddress.IsLoopback(hostAddress) || IsAddressLocal(hostAddress);
@@ -174,11 +176,13 @@ private bool IsLocal(Uri host)
// If it matches the primary domain, it's local. (Whether or not the hostname matches.)
string local = "." + IPGlobalProperties.GetIPGlobalProperties().DomainName;
+#pragma warning restore CA1416 // Validate platform compatibility
return
local.Length == (hostString.Length - dot) &&
string.Compare(local, 0, hostString, dot, local.Length, StringComparison.OrdinalIgnoreCase) == 0;
}
+ [UnsupportedOSPlatform("browser")]
private static bool IsAddressLocal(IPAddress ipAddress)
{
// Perf note: The .NET Framework caches this and then uses network change notifications to track
diff --git a/src/libraries/System.Net.WebSockets.Client/tests/ClientWebSocketOptionsTests.cs b/src/libraries/System.Net.WebSockets.Client/tests/ClientWebSocketOptionsTests.cs
index 8065bc3b38aea..a11c4aa9f4737 100644
--- a/src/libraries/System.Net.WebSockets.Client/tests/ClientWebSocketOptionsTests.cs
+++ b/src/libraries/System.Net.WebSockets.Client/tests/ClientWebSocketOptionsTests.cs
@@ -17,6 +17,7 @@ public class ClientWebSocketOptionsTests : ClientWebSocketTestBase
public ClientWebSocketOptionsTests(ITestOutputHelper output) : base(output) { }
[ConditionalFact(nameof(WebSocketsSupported))]
+ [PlatformSpecific(~TestPlatforms.Browser)] // Credentials not supported on browser
public static void UseDefaultCredentials_Roundtrips()
{
var cws = new ClientWebSocket();
@@ -28,6 +29,7 @@ public static void UseDefaultCredentials_Roundtrips()
}
[ConditionalFact(nameof(WebSocketsSupported))]
+ [PlatformSpecific(~TestPlatforms.Browser)] // Proxy not supported on browser
public static void Proxy_Roundtrips()
{
var cws = new ClientWebSocket();
@@ -99,6 +101,7 @@ public async Task Proxy_ConnectThruProxy_Success(Uri server)
}
[ConditionalFact(nameof(WebSocketsSupported))]
+ [PlatformSpecific(~TestPlatforms.Browser)] // Buffer not supported on browser
public static void SetBuffer_InvalidArgs_Throws()
{
// Recreate the minimum WebSocket buffer size values from the .NET Framework version of WebSocket,
@@ -120,6 +123,7 @@ public static void SetBuffer_InvalidArgs_Throws()
}
[ConditionalFact(nameof(WebSocketsSupported))]
+ [PlatformSpecific(~TestPlatforms.Browser)] // KeepAlive not supported on browser
public static void KeepAliveInterval_Roundtrips()
{
var cws = new ClientWebSocket();
@@ -138,6 +142,7 @@ public static void KeepAliveInterval_Roundtrips()
}
[ConditionalFact(nameof(WebSocketsSupported))]
+ [PlatformSpecific(~TestPlatforms.Browser)] // Certificates not supported on browser
public void RemoteCertificateValidationCallback_Roundtrips()
{
using (var cws = new ClientWebSocket())
@@ -157,6 +162,7 @@ public void RemoteCertificateValidationCallback_Roundtrips()
[ConditionalTheory(nameof(WebSocketsSupported))]
[InlineData(false)]
[InlineData(true)]
+ [PlatformSpecific(~TestPlatforms.Browser)] // Certificates not supported on browser
public async Task RemoteCertificateValidationCallback_PassedRemoteCertificateInfo(bool secure)
{
if (PlatformDetection.IsWindows7)
@@ -193,6 +199,7 @@ await LoopbackServer.CreateClientAndServerAsync(async uri =>
[OuterLoop("Connects to remote service")]
[ConditionalFact(nameof(WebSocketsSupported))]
+ [PlatformSpecific(~TestPlatforms.Browser)] // Credentials not supported on browser
public async Task ClientCertificates_ValidCertificate_ServerReceivesCertificateAndConnectAsyncSucceeds()
{
if (PlatformDetection.IsWindows7)
@@ -230,6 +237,7 @@ await LoopbackServer.CreateClientAndServerAsync(async uri =>
[ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)]
[InlineData("ws://")]
[InlineData("wss://")]
+ [PlatformSpecific(~TestPlatforms.Browser)] // Credentials not supported on browser
public async Task NonSecureConnect_ConnectThruProxy_CONNECTisUsed(string connectionType)
{
if (PlatformDetection.IsWindows7)
diff --git a/src/libraries/System.Net.WebSockets.Client/tests/CloseTest.cs b/src/libraries/System.Net.WebSockets.Client/tests/CloseTest.cs
index 7bdffd25e99b8..a803d4cb021fa 100644
--- a/src/libraries/System.Net.WebSockets.Client/tests/CloseTest.cs
+++ b/src/libraries/System.Net.WebSockets.Client/tests/CloseTest.cs
@@ -327,6 +327,7 @@ public async Task CloseAsync_DuringConcurrentReceiveAsync_ExpectedStates(Uri ser
[ConditionalFact(nameof(WebSocketsSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)]
public async Task CloseAsync_CancelableEvenWhenPendingReceive_Throws()
{
var tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
diff --git a/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs b/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs
index 265db6d6c4167..45c94e4164428 100644
--- a/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs
+++ b/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs
@@ -89,6 +89,7 @@ public async Task ConnectAsync_AddCustomHeaders_Success(Uri server)
[ConditionalFact(nameof(WebSocketsSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)]
public async Task ConnectAsync_AddHostHeader_Success()
{
string expectedHost = null;
@@ -208,6 +209,7 @@ public async Task ConnectAsync_PassMultipleSubProtocols_ServerRequires_Connectio
[ConditionalFact(nameof(WebSocketsSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)]
public async Task ConnectAsync_NonStandardRequestHeaders_HeadersAddedWithoutValidation()
{
await LoopbackServer.CreateClientAndServerAsync(async uri =>
@@ -246,6 +248,7 @@ public async Task ConnectAndCloseAsync_UseProxyServer_ExpectedClosedState(Uri se
}
[ConditionalFact(nameof(WebSocketsSupported))]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/44720", TestPlatforms.Browser)]
public async Task ConnectAsync_CancellationRequestedBeforeConnect_ThrowsOperationCanceledException()
{
using (var clientSocket = new ClientWebSocket())
@@ -259,6 +262,7 @@ public async Task ConnectAsync_CancellationRequestedBeforeConnect_ThrowsOperatio
[ConditionalFact(nameof(WebSocketsSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)]
public async Task ConnectAsync_CancellationRequestedAfterConnect_ThrowsOperationCanceledException()
{
var releaseServer = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
diff --git a/src/libraries/System.Net.WebSockets.Client/tests/SendReceiveTest.cs b/src/libraries/System.Net.WebSockets.Client/tests/SendReceiveTest.cs
index 163fc2b530e38..5bfc2c911d754 100644
--- a/src/libraries/System.Net.WebSockets.Client/tests/SendReceiveTest.cs
+++ b/src/libraries/System.Net.WebSockets.Client/tests/SendReceiveTest.cs
@@ -389,6 +389,7 @@ public async Task SendReceive_Concurrent_Success(Uri server)
[OuterLoop("Uses external servers")]
[ConditionalFact(nameof(WebSocketsSupported))]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/42852", TestPlatforms.Browser)]
public async Task SendReceive_ConnectionClosedPrematurely_ReceiveAsyncFailsAndWebSocketStateUpdated()
{
var options = new LoopbackServer.Options { WebSocketEndpoint = true };
diff --git a/src/libraries/System.Net.WebSockets.WebSocketProtocol/Directory.Build.props b/src/libraries/System.Net.WebSockets.WebSocketProtocol/Directory.Build.props
index bdcfca3b543cb..1db5968484c1e 100644
--- a/src/libraries/System.Net.WebSockets.WebSocketProtocol/Directory.Build.props
+++ b/src/libraries/System.Net.WebSockets.WebSocketProtocol/Directory.Build.props
@@ -2,5 +2,6 @@
Open
+ true
\ No newline at end of file
diff --git a/src/libraries/System.Net.WebSockets.WebSocketProtocol/ref/System.Net.WebSockets.WebSocketProtocol.cs b/src/libraries/System.Net.WebSockets.WebSocketProtocol/ref/System.Net.WebSockets.WebSocketProtocol.cs
index 7b6113f06d6a5..295705fdf90ac 100644
--- a/src/libraries/System.Net.WebSockets.WebSocketProtocol/ref/System.Net.WebSockets.WebSocketProtocol.cs
+++ b/src/libraries/System.Net.WebSockets.WebSocketProtocol/ref/System.Net.WebSockets.WebSocketProtocol.cs
@@ -6,6 +6,7 @@
namespace System.Net.WebSockets
{
+ [System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static partial class WebSocketProtocol
{
public static System.Net.WebSockets.WebSocket CreateFromStream(System.IO.Stream stream, bool isServer, string? subProtocol, System.TimeSpan keepAliveInterval) { throw null; }
diff --git a/src/libraries/System.Net.WebSockets.WebSocketProtocol/src/System/Net/WebSockets/WebSocketProtocol.cs b/src/libraries/System.Net.WebSockets.WebSocketProtocol/src/System/Net/WebSockets/WebSocketProtocol.cs
index 49e3196964bd7..1178e70d760c1 100644
--- a/src/libraries/System.Net.WebSockets.WebSocketProtocol/src/System/Net/WebSockets/WebSocketProtocol.cs
+++ b/src/libraries/System.Net.WebSockets.WebSocketProtocol/src/System/Net/WebSockets/WebSocketProtocol.cs
@@ -2,10 +2,12 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System.IO;
+using System.Runtime.Versioning;
using System.Threading;
namespace System.Net.WebSockets
{
+ [UnsupportedOSPlatform("browser")]
public static class WebSocketProtocol
{
public static WebSocket CreateFromStream(
diff --git a/src/libraries/System.Net.WebSockets/ref/System.Net.WebSockets.cs b/src/libraries/System.Net.WebSockets/ref/System.Net.WebSockets.cs
index e4ff945bb5b64..ca1e25ea21289 100644
--- a/src/libraries/System.Net.WebSockets/ref/System.Net.WebSockets.cs
+++ b/src/libraries/System.Net.WebSockets/ref/System.Net.WebSockets.cs
@@ -26,8 +26,10 @@ protected WebSocket() { }
public abstract System.Threading.Tasks.Task CloseAsync(System.Net.WebSockets.WebSocketCloseStatus closeStatus, string? statusDescription, System.Threading.CancellationToken cancellationToken);
public abstract System.Threading.Tasks.Task CloseOutputAsync(System.Net.WebSockets.WebSocketCloseStatus closeStatus, string? statusDescription, System.Threading.CancellationToken cancellationToken);
public static System.ArraySegment CreateClientBuffer(int receiveBufferSize, int sendBufferSize) { throw null; }
+ [System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Net.WebSockets.WebSocket CreateClientWebSocket(System.IO.Stream innerStream, string? subProtocol, int receiveBufferSize, int sendBufferSize, System.TimeSpan keepAliveInterval, bool useZeroMaskingKey, System.ArraySegment internalBuffer) { throw null; }
+ [System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static System.Net.WebSockets.WebSocket CreateFromStream(System.IO.Stream stream, bool isServer, string? subProtocol, System.TimeSpan keepAliveInterval) { throw null; }
public static System.ArraySegment CreateServerBuffer(int receiveBufferSize) { throw null; }
public abstract void Dispose();
diff --git a/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/WebSocket.cs b/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/WebSocket.cs
index 3bd6835a16f1d..14732fb6b77ca 100644
--- a/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/WebSocket.cs
+++ b/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/WebSocket.cs
@@ -5,6 +5,7 @@
using System.ComponentModel;
using System.IO;
using System.Runtime.InteropServices;
+using System.Runtime.Versioning;
using System.Threading;
using System.Threading.Tasks;
@@ -133,6 +134,7 @@ public static ArraySegment CreateServerBuffer(int receiveBufferSize)
/// The agreed upon sub-protocol that was used when creating the connection.
/// The keep-alive interval to use, or to disable keep-alives.
/// The created .
+ [UnsupportedOSPlatform("browser")]
public static WebSocket CreateFromStream(Stream stream, bool isServer, string? subProtocol, TimeSpan keepAliveInterval)
{
if (stream == null)
@@ -172,6 +174,7 @@ public static void RegisterPrefixes()
throw new PlatformNotSupportedException();
}
+ [UnsupportedOSPlatform("browser")]
[EditorBrowsable(EditorBrowsableState.Never)]
public static WebSocket CreateClientWebSocket(Stream innerStream,
string? subProtocol, int receiveBufferSize, int sendBufferSize,
diff --git a/src/libraries/System.Private.CoreLib/src/Internal/IO/File.cs b/src/libraries/System.Private.CoreLib/src/Internal/IO/File.cs
index b3aa37ad891e3..a6502f2d7e300 100644
--- a/src/libraries/System.Private.CoreLib/src/Internal/IO/File.cs
+++ b/src/libraries/System.Private.CoreLib/src/Internal/IO/File.cs
@@ -42,8 +42,6 @@ public static bool Exists([NotNullWhen(true)] string? path)
return InternalExists(path);
}
catch (ArgumentException) { }
- catch (NotSupportedException) { } // Security can throw this on ":"
- catch (SecurityException) { }
catch (IOException) { }
catch (UnauthorizedAccessException) { }
diff --git a/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx b/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx
index f3a82588fc95c..fb707d1f4e7a2 100644
--- a/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx
+++ b/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx
@@ -601,6 +601,9 @@
Must specify binding flags describing the invoke operation required (BindingFlags.InvokeMethod CreateInstance GetField SetField GetProperty SetProperty).
+
+ No parameterless constructor defined.
+
No parameterless constructor defined for type '{0}'.
@@ -1381,9 +1384,6 @@
Uninitialized Strings cannot be created.
-
- The object's type must not be a Windows Runtime type.
-
The object's type must be __ComObject or derived from __ComObject.
@@ -1504,9 +1504,6 @@
Field '{0}' in TypedReferences cannot be static.
-
- The type must not be a Windows Runtime type.
-
The specified type must be visible from COM.
@@ -1549,9 +1546,6 @@
The length of the name exceeds the maximum limit.
-
- Cannot marshal type '{0}' to Windows Runtime. Only 'System.RuntimeType' is supported.
-
MethodOverride's body must be from this type.
@@ -2395,15 +2389,6 @@
Object cannot be stored in an array of this type.
-
- Object in an IPropertyValue is of type '{0}' which cannot be convereted to a '{1}' due to array element '{2}': {3}.
-
-
- Object in an IPropertyValue is of type '{0}' with value '{1}', which cannot be converted to a '{2}'.
-
-
- Object in an IPropertyValue is of type '{0}', which cannot be converted to a '{1}'.
-
AsyncFlowControl objects can be used to restore flow only on a Context that had its flow suppressed.
@@ -2563,9 +2548,6 @@
This operation is only valid on generic types.
-
- Adding or removing event handlers dynamically is not supported on WinRT events.
-
This API is not available when the concurrent GC is enabled.
@@ -2863,9 +2845,6 @@
A non-collectible assembly may not reference a collectible assembly.
-
- WinRT Interop is not supported for collectible types.
-
CreateInstance cannot be used with an object of type TypeBuilder.
@@ -3136,9 +3115,6 @@
Strong-name signing is not supported on this platform.
-
- Windows Runtime is not supported on this operating system.
-
This API is specific to the way in which Windows handles asynchronous I/O, and is not supported on this platform.
@@ -3775,4 +3751,7 @@
CodeBase is not supported on assemblies loaded from a single-file bundle.
+
+ Cannot dynamically create an instance of type '{0}'. Reason: {1}
+
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 db4ea9c653916..ed4e0b619de5a 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
@@ -1852,11 +1852,14 @@
Link="Common\System\IO\StringParser.cs" />
+
+
diff --git a/src/libraries/System.Private.CoreLib/src/System/AggregateException.cs b/src/libraries/System.Private.CoreLib/src/System/AggregateException.cs
index 14bc2f56436fe..0fc24781a1677 100644
--- a/src/libraries/System.Private.CoreLib/src/System/AggregateException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/AggregateException.cs
@@ -21,15 +21,15 @@ namespace System
[System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class AggregateException : Exception
{
- private readonly ReadOnlyCollection m_innerExceptions; // Complete set of exceptions. Do not rename (binary serialization)
+ private readonly Exception[] _innerExceptions; // Complete set of exceptions.
+ private ReadOnlyCollection? _rocView; // separate from _innerExceptions to enable trimming if InnerExceptions isn't used
///
/// Initializes a new instance of the class.
///
public AggregateException()
- : base(SR.AggregateException_ctor_DefaultMessage)
+ : this(SR.AggregateException_ctor_DefaultMessage)
{
- m_innerExceptions = new ReadOnlyCollection(Array.Empty());
}
///
@@ -40,7 +40,7 @@ public AggregateException()
public AggregateException(string? message)
: base(message)
{
- m_innerExceptions = new ReadOnlyCollection(Array.Empty());
+ _innerExceptions = Array.Empty();
}
///
@@ -59,7 +59,7 @@ public AggregateException(string? message, Exception innerException)
throw new ArgumentNullException(nameof(innerException));
}
- m_innerExceptions = new ReadOnlyCollection(new Exception[] { innerException });
+ _innerExceptions = new[] { innerException };
}
///
@@ -101,9 +101,7 @@ public AggregateException(params Exception[] innerExceptions) :
/// An element of is
/// null.
public AggregateException(string? message, IEnumerable innerExceptions)
- // If it's already an IList, pass that along (a defensive copy will be made in the delegated ctor). If it's null, just pass along
- // null typed correctly. Otherwise, create an IList from the enumerable and pass that along.
- : this(message, innerExceptions as IList ?? (innerExceptions == null ? (List)null! : new List(innerExceptions)))
+ : this(message, innerExceptions == null ? null : new List(innerExceptions).ToArray(), cloneExceptions: false)
{
}
@@ -118,43 +116,29 @@ public AggregateException(string? message, IEnumerable innerException
/// An element of is
/// null.
public AggregateException(string? message, params Exception[] innerExceptions) :
- this(message, (IList)innerExceptions)
+ this(message, innerExceptions, cloneExceptions: true)
{
}
- ///
- /// Allocates a new aggregate exception with the specified message and list of inner exceptions.
- ///
- /// The error message that explains the reason for the exception.
- /// The exceptions that are the cause of the current exception.
- /// The argument
- /// is null.
- /// An element of is
- /// null.
- private AggregateException(string? message, IList innerExceptions)
- : base(message, innerExceptions != null && innerExceptions.Count > 0 ? innerExceptions[0] : null)
+ private AggregateException(string? message, Exception[]? innerExceptions, bool cloneExceptions) :
+ base(message, innerExceptions?.Length > 0 ? innerExceptions[0] : null)
{
if (innerExceptions == null)
{
throw new ArgumentNullException(nameof(innerExceptions));
}
- // Copy exceptions to our internal array and validate them. We must copy them,
- // because we're going to put them into a ReadOnlyCollection which simply reuses
- // the list passed in to it. We don't want callers subsequently mutating.
- Exception[] exceptionsCopy = new Exception[innerExceptions.Count];
+ _innerExceptions = cloneExceptions ? new Exception[innerExceptions.Length] : innerExceptions;
- for (int i = 0; i < exceptionsCopy.Length; i++)
+ for (int i = 0; i < _innerExceptions.Length; i++)
{
- exceptionsCopy[i] = innerExceptions[i];
+ _innerExceptions[i] = innerExceptions[i];
- if (exceptionsCopy[i] == null)
+ if (innerExceptions[i] == null)
{
throw new ArgumentException(SR.AggregateException_ctor_InnerExceptionNull);
}
}
-
- m_innerExceptions = new ReadOnlyCollection(exceptionsCopy);
}
///
@@ -168,7 +152,7 @@ private AggregateException(string? message, IList innerExceptions)
/// is null.
/// An element of is
/// null.
- internal AggregateException(IEnumerable innerExceptionInfos) :
+ internal AggregateException(List innerExceptionInfos) :
this(SR.AggregateException_ctor_DefaultMessage, innerExceptionInfos)
{
}
@@ -186,54 +170,16 @@ internal AggregateException(IEnumerable innerExceptionInf
/// is null.
/// An element of is
/// null.
- internal AggregateException(string message, IEnumerable innerExceptionInfos)
- // If it's already an IList, pass that along (a defensive copy will be made in the delegated ctor). If it's null, just pass along
- // null typed correctly. Otherwise, create an IList from the enumerable and pass that along.
- : this(message, innerExceptionInfos as IList ??
- (innerExceptionInfos == null ?
- (List)null! :
- new List(innerExceptionInfos)))
- {
- }
-
- ///
- /// Allocates a new aggregate exception with the specified message and list of inner
- /// exception dispatch info objects.
- ///
- /// The error message that explains the reason for the exception.
- ///
- /// Information about the exceptions that are the cause of the current exception.
- ///
- /// The argument
- /// is null.
- /// An element of is
- /// null.
- private AggregateException(string message, IList innerExceptionInfos)
- : base(message, innerExceptionInfos != null && innerExceptionInfos.Count > 0 && innerExceptionInfos[0] != null ?
- innerExceptionInfos[0].SourceException : null)
+ internal AggregateException(string message, List innerExceptionInfos)
+ : base(message, innerExceptionInfos.Count != 0 ? innerExceptionInfos[0].SourceException : null)
{
- if (innerExceptionInfos == null)
- {
- throw new ArgumentNullException(nameof(innerExceptionInfos));
- }
+ _innerExceptions = new Exception[innerExceptionInfos.Count];
- // Copy exceptions to our internal array and validate them. We must copy them,
- // because we're going to put them into a ReadOnlyCollection which simply reuses
- // the list passed in to it. We don't want callers subsequently mutating.
- Exception[] exceptionsCopy = new Exception[innerExceptionInfos.Count];
-
- for (int i = 0; i < exceptionsCopy.Length; i++)
+ for (int i = 0; i < _innerExceptions.Length; i++)
{
- ExceptionDispatchInfo edi = innerExceptionInfos[i];
- if (edi != null) exceptionsCopy[i] = edi.SourceException;
-
- if (exceptionsCopy[i] == null)
- {
- throw new ArgumentException(SR.AggregateException_ctor_InnerExceptionNull);
- }
+ _innerExceptions[i] = innerExceptionInfos[i].SourceException;
+ Debug.Assert(_innerExceptions[i] != null);
}
-
- m_innerExceptions = new ReadOnlyCollection(exceptionsCopy);
}
///
@@ -248,18 +194,13 @@ private AggregateException(string message, IList innerExc
protected AggregateException(SerializationInfo info, StreamingContext context) :
base(info, context)
{
- if (info == null)
- {
- throw new ArgumentNullException(nameof(info));
- }
-
- Exception[]? innerExceptions = info.GetValue("InnerExceptions", typeof(Exception[])) as Exception[];
+ Exception[]? innerExceptions = info.GetValue("InnerExceptions", typeof(Exception[])) as Exception[]; // Do not rename (binary serialization)
if (innerExceptions is null)
{
throw new SerializationException(SR.AggregateException_DeserializationFailure);
}
- m_innerExceptions = new ReadOnlyCollection(innerExceptions);
+ _innerExceptions = innerExceptions;
}
///
@@ -275,9 +216,7 @@ public override void GetObjectData(SerializationInfo info, StreamingContext cont
{
base.GetObjectData(info, context);
- Exception[] innerExceptions = new Exception[m_innerExceptions.Count];
- m_innerExceptions.CopyTo(innerExceptions, 0);
- info.AddValue("InnerExceptions", innerExceptions, typeof(Exception[]));
+ info.AddValue("InnerExceptions", _innerExceptions, typeof(Exception[])); // Do not rename (binary serialization)
}
///
@@ -302,7 +241,7 @@ public override Exception GetBaseException()
/// Gets a read-only collection of the instances that caused the
/// current exception.
///
- public ReadOnlyCollection InnerExceptions => m_innerExceptions;
+ public ReadOnlyCollection InnerExceptions => _rocView ??= new ReadOnlyCollection(_innerExceptions);
///
@@ -332,21 +271,21 @@ public void Handle(Func predicate)
}
List? unhandledExceptions = null;
- for (int i = 0; i < m_innerExceptions.Count; i++)
+ for (int i = 0; i < _innerExceptions.Length; i++)
{
// If the exception was not handled, lazily allocate a list of unhandled
// exceptions (to be rethrown later) and add it.
- if (!predicate(m_innerExceptions[i]))
+ if (!predicate(_innerExceptions[i]))
{
unhandledExceptions ??= new List();
- unhandledExceptions.Add(m_innerExceptions[i]);
+ unhandledExceptions.Add(_innerExceptions[i]);
}
}
// If there are unhandled exceptions remaining, throw them.
if (unhandledExceptions != null)
{
- throw new AggregateException(Message, unhandledExceptions);
+ throw new AggregateException(Message, unhandledExceptions.ToArray(), cloneExceptions: false);
}
}
@@ -400,7 +339,7 @@ public AggregateException Flatten()
}
}
- return new AggregateException(GetType() == typeof(AggregateException) ? base.Message : Message, flattenedExceptions);
+ return new AggregateException(GetType() == typeof(AggregateException) ? base.Message : Message, flattenedExceptions.ToArray(), cloneExceptions: false);
}
/// Gets a message that describes the exception.
@@ -408,7 +347,7 @@ public override string Message
{
get
{
- if (m_innerExceptions.Count == 0)
+ if (_innerExceptions.Length == 0)
{
return base.Message;
}
@@ -416,10 +355,10 @@ public override string Message
StringBuilder sb = StringBuilderCache.Acquire();
sb.Append(base.Message);
sb.Append(' ');
- for (int i = 0; i < m_innerExceptions.Count; i++)
+ for (int i = 0; i < _innerExceptions.Length; i++)
{
sb.Append('(');
- sb.Append(m_innerExceptions[i].Message);
+ sb.Append(_innerExceptions[i].Message);
sb.Append(") ");
}
sb.Length--;
@@ -436,14 +375,14 @@ public override string ToString()
StringBuilder text = new StringBuilder();
text.Append(base.ToString());
- for (int i = 0; i < m_innerExceptions.Count; i++)
+ for (int i = 0; i < _innerExceptions.Length; i++)
{
- if (m_innerExceptions[i] == InnerException)
+ if (_innerExceptions[i] == InnerException)
continue; // Already logged in base.ToString()
text.Append(Environment.NewLineConst + InnerExceptionPrefix);
text.AppendFormat(CultureInfo.InvariantCulture, SR.AggregateException_InnerException, i);
- text.Append(m_innerExceptions[i].ToString());
+ text.Append(_innerExceptions[i].ToString());
text.Append("<---");
text.AppendLine();
}
@@ -460,6 +399,8 @@ public override string ToString()
///
/// See https://docs.microsoft.com/en-us/visualstudio/debugger/using-the-debuggerdisplay-attribute
///
- private int InnerExceptionCount => InnerExceptions.Count;
+ internal int InnerExceptionCount => _innerExceptions.Length;
+
+ internal Exception[] InternalInnerExceptions => _innerExceptions;
}
}
diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/RandomizedStringEqualityComparer.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/RandomizedStringEqualityComparer.cs
index 168959d83386a..30db6049d22f7 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/RandomizedStringEqualityComparer.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/RandomizedStringEqualityComparer.cs
@@ -80,31 +80,6 @@ internal OrdinalIgnoreCaseComparer(IEqualityComparer wrappedComparer)
public override bool Equals(string? x, string? y) => string.EqualsOrdinalIgnoreCase(x, y);
- public override int GetHashCode(string? obj)
- {
- if (obj is null)
- {
- return 0;
- }
-
- // The Ordinal version of Marvin32 operates over bytes, so convert
- // char count -> byte count. Guaranteed not to integer overflow.
- return Marvin.ComputeHash32(
- ref Unsafe.As(ref obj.GetRawStringData()),
- (uint)obj.Length * sizeof(char),
- _seed.p0, _seed.p1);
- }
- }
-
- private sealed class RandomizedOrdinalIgnoreCaseComparer : RandomizedStringEqualityComparer
- {
- internal RandomizedOrdinalIgnoreCaseComparer(IEqualityComparer underlyingComparer)
- : base(underlyingComparer)
- {
- }
-
- public override bool Equals(string? x, string? y) => string.EqualsOrdinalIgnoreCase(x, y);
-
public override int GetHashCode(string? obj)
{
if (obj is null)
diff --git a/src/libraries/System.Private.CoreLib/src/System/DefaultBinder.cs b/src/libraries/System.Private.CoreLib/src/System/DefaultBinder.cs
index 8b5b1c31c6ffb..6b275ff8b21ca 100644
--- a/src/libraries/System.Private.CoreLib/src/System/DefaultBinder.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/DefaultBinder.cs
@@ -189,7 +189,7 @@ public sealed override MethodBase BindToMethod(
#region Match method by parameter type
for (j = 0; j < argsToCheck; j++)
{
-#region Classic argument coersion checks
+#region Classic argument coercion checks
// get the formal type
pCls = par[j].ParameterType;
diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/CounterGroup.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/CounterGroup.cs
index effc21fd61ad5..e6ce6fda4a38a 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/CounterGroup.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/CounterGroup.cs
@@ -6,6 +6,7 @@
using System.Diagnostics;
#endif
using System.Collections.Generic;
+using System.Runtime.Versioning;
using System.Threading;
#if ES_BUILD_STANDALONE
@@ -14,6 +15,7 @@ namespace Microsoft.Diagnostics.Tracing
namespace System.Diagnostics.Tracing
#endif
{
+ [UnsupportedOSPlatform("browser")]
internal class CounterGroup
{
private readonly EventSource _eventSource;
diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/DiagnosticCounter.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/DiagnosticCounter.cs
index c2c7e20b347f4..16724c371c49f 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/DiagnosticCounter.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/DiagnosticCounter.cs
@@ -6,6 +6,7 @@
using System.Diagnostics;
#endif
using System.Collections.Generic;
+using System.Runtime.Versioning;
using System.Text;
using System.Threading;
@@ -19,6 +20,7 @@ namespace System.Diagnostics.Tracing
/// DiagnosticCounter is an abstract class that serves as the parent class for various Counter* classes,
/// namely EventCounter, PollingCounter, IncrementingEventCounter, and IncrementingPollingCounter.
///
+ [UnsupportedOSPlatform("browser")]
public abstract class DiagnosticCounter : IDisposable
{
///
diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventCounter.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventCounter.cs
index 9d14c881e183b..2f4489afc9e6c 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventCounter.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventCounter.cs
@@ -6,6 +6,7 @@
using System.Diagnostics;
#endif
using System.Diagnostics.CodeAnalysis;
+using System.Runtime.Versioning;
using System.Threading;
#if ES_BUILD_STANDALONE
@@ -23,6 +24,7 @@ namespace System.Diagnostics.Tracing
/// See https://github.com/dotnet/runtime/blob/master/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestEventCounter.cs
/// which shows tests, which are also useful in seeing actual use.
///
+ [UnsupportedOSPlatform("browser")]
public partial class EventCounter : DiagnosticCounter
{
///
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 e3d0c2b4a9e75..a5171d45a7bf4 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
@@ -1481,12 +1481,12 @@ private unsafe void Initialize(Guid eventSourceGuid, string eventSourceName, str
#endif
#if FEATURE_MANAGED_ETW
// Register the provider with ETW
- var etwProvider = new OverideEventProvider(this, EventProviderType.ETW);
+ var etwProvider = new OverrideEventProvider(this, EventProviderType.ETW);
etwProvider.Register(this);
#endif
#if FEATURE_PERFTRACING
// Register the provider with EventPipe
- var eventPipeProvider = new OverideEventProvider(this, EventProviderType.EventPipe);
+ var eventPipeProvider = new OverrideEventProvider(this, EventProviderType.EventPipe);
lock (EventListener.EventListenersLock)
{
eventPipeProvider.Register(this);
@@ -2444,9 +2444,9 @@ internal static EventOpcode GetOpcodeWithDefault(EventOpcode opcode, string? eve
///
/// This class lets us hook the 'OnEventCommand' from the eventSource.
///
- private class OverideEventProvider : EventProvider
+ private class OverrideEventProvider : EventProvider
{
- public OverideEventProvider(EventSource eventSource, EventProviderType providerType)
+ public OverrideEventProvider(EventSource eventSource, EventProviderType providerType)
: base(providerType)
{
this.m_eventSource = eventSource;
@@ -3278,10 +3278,15 @@ private static bool AttributeTypeNamesMatch(Type attributeType, Type reflectedAt
}
}
#endif
- string eventKey = "event_" + eventName;
- string? msg = manifest.GetLocalizedMessage(eventKey, CultureInfo.CurrentUICulture, etwFormat: false);
- // overwrite inline message with the localized message
- if (msg != null) eventAttribute.Message = msg;
+ if (manifest.HasResources)
+ {
+ string eventKey = "event_" + eventName;
+ if (manifest.GetLocalizedMessage(eventKey, CultureInfo.CurrentUICulture, etwFormat: false) is string msg)
+ {
+ // overwrite inline message with the localized message
+ eventAttribute.Message = msg;
+ }
+ }
AddEventDescriptor(ref eventData, eventName, eventAttribute, args, hasRelatedActivityID);
}
@@ -3769,12 +3774,12 @@ private bool SelfDescribingEvents
// Dispatching state
internal volatile EventDispatcher? m_Dispatchers; // Linked list of code:EventDispatchers we write the data to (we also do ETW specially)
#if FEATURE_MANAGED_ETW
- private volatile OverideEventProvider m_etwProvider = null!; // This hooks up ETW commands to our 'OnEventCommand' callback
+ private volatile OverrideEventProvider m_etwProvider = null!; // This hooks up ETW commands to our 'OnEventCommand' callback
#endif
#if FEATURE_PERFTRACING
private object? m_createEventLock;
private IntPtr m_writeEventStringEventHandle = IntPtr.Zero;
- private volatile OverideEventProvider m_eventPipeProvider = null!;
+ private volatile OverrideEventProvider m_eventPipeProvider = null!;
#endif
private bool m_completelyInited; // The EventSource constructor has returned without exception.
private Exception? m_constructionException; // If there was an exception construction, this is it
@@ -5366,11 +5371,11 @@ public void StartEvent(string eventName, EventAttribute eventAttribute)
numParams = 0;
byteArrArgIndices = null;
- events.Append(" Errors => errors;
+ public bool HasResources => resources != null;
+
///
/// When validating an event source it adds the error to the error collection.
/// When not validating it throws an exception if runtimeCritical is "true".
@@ -5516,6 +5535,10 @@ public void ManifestError(string msg, bool runtimeCritical = false)
private string CreateManifestString()
{
+#if !ES_BUILD_STANDALONE
+ Span ulongHexScratch = stackalloc char[16]; // long enough for ulong.MaxValue formatted as hex
+#endif
+
#if FEATURE_MANAGED_ETW_CHANNELS
// Write out the channels
if (channelTab != null)
@@ -5530,7 +5553,6 @@ private string CreateManifestString()
ChannelInfo channelInfo = kvpair.Value;
string? channelType = null;
- const string ElementName = "channel";
bool enabled = false;
string? fullName = null;
#if FEATURE_ADVANCED_MANAGED_ETW_CHANNELS
@@ -5557,24 +5579,20 @@ private string CreateManifestString()
fullName ??= providerName + "/" + channelInfo.Name;
- sb.Append(" <").Append(ElementName);
- sb.Append(" chid=\"").Append(channelInfo.Name).Append('"');
- sb.Append(" name=\"").Append(fullName).Append('"');
- if (ElementName == "channel") // not applicable to importChannels.
- {
- Debug.Assert(channelInfo.Name != null);
- WriteMessageAttrib(sb, "channel", channelInfo.Name, null);
- sb.Append(" value=\"").Append(channel).Append('"');
- if (channelType != null)
- sb.Append(" type=\"").Append(channelType).Append('"');
- sb.Append(" enabled=\"").Append(enabled ? "true" : "false").Append('"');
+ sb.Append(" ");
}
sb.AppendLine(" ");
@@ -5625,7 +5643,14 @@ private string CreateManifestString()
// TODO: Warn people about the dropping of values.
if (isbitmap && ((hexValue & (hexValue - 1)) != 0 || hexValue == 0))
continue;
- sb.Append("
+#if NETCOREAPP
+ [UnsupportedOSPlatform("browser")]
+#endif
public partial class IncrementingEventCounter : DiagnosticCounter
{
///
diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/IncrementingPollingCounter.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/IncrementingPollingCounter.cs
index 3854d1c93cce6..d18e5ad6f93c3 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/IncrementingPollingCounter.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/IncrementingPollingCounter.cs
@@ -8,6 +8,8 @@
#if ES_BUILD_STANDALONE
namespace Microsoft.Diagnostics.Tracing
#else
+using System.Runtime.Versioning;
+
namespace System.Diagnostics.Tracing
#endif
{
@@ -19,6 +21,9 @@ namespace System.Diagnostics.Tracing
/// Unlike IncrementingEventCounter, this takes in a polling callback that it can call to update
/// its own metric periodically.
///
+#if NETCOREAPP
+ [UnsupportedOSPlatform("browser")]
+#endif
public partial class IncrementingPollingCounter : DiagnosticCounter
{
///
diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/PollingCounter.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/PollingCounter.cs
index 12f0349067f0a..d2b88669b21ac 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/PollingCounter.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/PollingCounter.cs
@@ -8,6 +8,8 @@
#if ES_BUILD_STANDALONE
namespace Microsoft.Diagnostics.Tracing
#else
+using System.Runtime.Versioning;
+
namespace System.Diagnostics.Tracing
#endif
{
@@ -17,6 +19,9 @@ namespace System.Diagnostics.Tracing
/// function to collect metrics on its own rather than the user having to call WriteMetric()
/// every time.
///
+#if NETCOREAPP
+ [UnsupportedOSPlatform("browser")]
+#endif
public partial class PollingCounter : DiagnosticCounter
{
///
diff --git a/src/libraries/System.Private.CoreLib/src/System/Enum.cs b/src/libraries/System.Private.CoreLib/src/System/Enum.cs
index d69077cfb9c52..e8377f593bb7d 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Enum.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Enum.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.Binary;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
@@ -63,26 +64,38 @@ private string ValueToString()
private string ValueToHexString()
{
ref byte data = ref this.GetRawData();
+ Span bytes = stackalloc byte[8];
+ int length;
switch (InternalGetCorElementType())
{
case CorElementType.ELEMENT_TYPE_I1:
case CorElementType.ELEMENT_TYPE_U1:
- return data.ToString("X2", null);
+ bytes[0] = data;
+ length = 1;
+ break;
case CorElementType.ELEMENT_TYPE_BOOLEAN:
- return Convert.ToByte(Unsafe.As(ref data)).ToString("X2", null);
+ return data != 0 ? "01" : "00";
case CorElementType.ELEMENT_TYPE_I2:
case CorElementType.ELEMENT_TYPE_U2:
case CorElementType.ELEMENT_TYPE_CHAR:
- return Unsafe.As(ref data).ToString("X4", null);
+ BinaryPrimitives.WriteUInt16BigEndian(bytes, Unsafe.As(ref data));
+ length = 2;
+ break;
case CorElementType.ELEMENT_TYPE_I4:
case CorElementType.ELEMENT_TYPE_U4:
- return Unsafe.As(ref data).ToString("X8", null);
+ BinaryPrimitives.WriteUInt32BigEndian(bytes, Unsafe.As(ref data));
+ length = 4;
+ break;
case CorElementType.ELEMENT_TYPE_I8:
case CorElementType.ELEMENT_TYPE_U8:
- return Unsafe.As(ref data).ToString("X16", null);
+ BinaryPrimitives.WriteUInt64BigEndian(bytes, Unsafe.As(ref data));
+ length = 8;
+ break;
default:
throw new InvalidOperationException(SR.InvalidOperation_UnknownEnumType);
}
+
+ return HexConverter.ToString(bytes.Slice(0, length), HexConverter.Casing.Upper);
}
private static string ValueToHexString(object value)
@@ -91,7 +104,7 @@ private static string ValueToHexString(object value)
{
TypeCode.SByte => ((byte)(sbyte)value).ToString("X2", null),
TypeCode.Byte => ((byte)value).ToString("X2", null),
- TypeCode.Boolean => Convert.ToByte((bool)value).ToString("X2", null), // direct cast from bool to byte is not allowed
+ TypeCode.Boolean => ((bool)value) ? "01" : "00",
TypeCode.Int16 => ((ushort)(short)value).ToString("X4", null),
TypeCode.UInt16 => ((ushort)value).ToString("X4", null),
TypeCode.Char => ((ushort)(char)value).ToString("X4", null),
@@ -129,19 +142,17 @@ private static string ValueToHexString(object value)
}
else // These are flags OR'ed together (We treat everything as unsigned types)
{
- return InternalFlagsFormat(enumType, enumInfo, value);
+ return InternalFlagsFormat(enumInfo, value);
}
}
private static string? InternalFlagsFormat(RuntimeType enumType, ulong result)
{
- return InternalFlagsFormat(enumType, GetEnumInfo(enumType), result);
+ return InternalFlagsFormat(GetEnumInfo(enumType), result);
}
- private static string? InternalFlagsFormat(RuntimeType enumType, EnumInfo enumInfo, ulong resultValue)
+ private static string? InternalFlagsFormat(EnumInfo enumInfo, ulong resultValue)
{
- Debug.Assert(enumType != null);
-
string[] names = enumInfo.Names;
ulong[] values = enumInfo.Values;
Debug.Assert(names.Length == values.Length);
@@ -245,10 +256,10 @@ internal static ulong ToUInt64(object value)
{
TypeCode.SByte => (ulong)(sbyte)value,
TypeCode.Byte => (byte)value,
- TypeCode.Boolean => Convert.ToByte((bool)value), // direct cast from bool to byte is not allowed
+ TypeCode.Boolean => (bool)value ? 1UL : 0UL,
TypeCode.Int16 => (ulong)(short)value,
TypeCode.UInt16 => (ushort)value,
- TypeCode.Char => (ushort)(char)value,
+ TypeCode.Char => (char)value,
TypeCode.UInt32 => (uint)value,
TypeCode.Int32 => (ulong)(int)value,
TypeCode.UInt64 => (ulong)value,
@@ -263,7 +274,7 @@ private static ulong ToUInt64(TEnum value) where TEnum : struct, Enum =>
{
TypeCode.SByte => (ulong)Unsafe.As(ref value),
TypeCode.Byte => Unsafe.As(ref value),
- TypeCode.Boolean => Convert.ToByte(Unsafe.As(ref value)),
+ TypeCode.Boolean => Unsafe.As(ref value) ? 1UL : 0UL,
TypeCode.Int16 => (ulong)Unsafe.As(ref value),
TypeCode.UInt16 => Unsafe.As(ref value),
TypeCode.Char => Unsafe.As(ref value),
@@ -934,7 +945,7 @@ private ulong ToUInt64()
case CorElementType.ELEMENT_TYPE_U1:
return data;
case CorElementType.ELEMENT_TYPE_BOOLEAN:
- return Convert.ToUInt64(Unsafe.As(ref data), CultureInfo.InvariantCulture);
+ return data != 0 ? 1UL : 0UL;
case CorElementType.ELEMENT_TYPE_I2:
return (ulong)Unsafe.As(ref data);
case CorElementType.ELEMENT_TYPE_U2:
@@ -1197,7 +1208,7 @@ DateTime IConvertible.ToDateTime(IFormatProvider? provider)
object IConvertible.ToType(Type type, IFormatProvider? provider)
{
- return Convert.DefaultToType((IConvertible)this, type, provider);
+ return Convert.DefaultToType(this, type, provider);
}
#endregion
@@ -1234,7 +1245,7 @@ private static object ToObject(Type enumType, char value) =>
InternalBoxEnum(ValidateRuntimeType(enumType), value);
private static object ToObject(Type enumType, bool value) =>
- InternalBoxEnum(ValidateRuntimeType(enumType), value ? 1 : 0);
+ InternalBoxEnum(ValidateRuntimeType(enumType), value ? 1L : 0L);
#endregion
diff --git a/src/libraries/System.Private.CoreLib/src/System/Environment.SunOS.cs b/src/libraries/System.Private.CoreLib/src/System/Environment.SunOS.cs
new file mode 100644
index 0000000000000..fb7ff75cb2e6c
--- /dev/null
+++ b/src/libraries/System.Private.CoreLib/src/System/Environment.SunOS.cs
@@ -0,0 +1,13 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Runtime.InteropServices;
+
+namespace System
+{
+ public static partial class Environment
+ {
+ public static long WorkingSet =>
+ (long)(Interop.procfs.TryReadProcessStatusInfo(ProcessId, out Interop.procfs.ProcessStatusInfo status) ? status.ResidentSetSize : 0);
+ }
+}
diff --git a/src/libraries/System.Private.CoreLib/src/System/Environment.Variables.Windows.cs b/src/libraries/System.Private.CoreLib/src/System/Environment.Variables.Windows.cs
index 15f027c202e65..382021ea055ca 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Environment.Variables.Windows.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Environment.Variables.Windows.cs
@@ -58,93 +58,68 @@ private static void SetEnvironmentVariableCore(string variable, string? value)
public static unsafe IDictionary GetEnvironmentVariables()
{
- char* pStrings = Interop.Kernel32.GetEnvironmentStrings();
- if (pStrings == null)
+ // Format for GetEnvironmentStrings is:
+ // [=HiddenVar=value\0]* [Variable=value\0]* \0
+ // See the description of Environment Blocks in MSDN's CreateProcess
+ // page (null-terminated array of null-terminated strings). Note
+ // the =HiddenVar's aren't always at the beginning.
+
+ // Copy strings out, parsing into pairs and inserting into the table.
+ // The first few environment variable entries start with an '='.
+ // The current working directory of every drive (except for those drives
+ // you haven't cd'ed into in your DOS window) are stored in the
+ // environment block (as =C:=pwd) and the program's exit code is
+ // as well (=ExitCode=00000000).
+
+ char* stringPtr = Interop.Kernel32.GetEnvironmentStringsW();
+ if (stringPtr == null)
{
throw new OutOfMemoryException();
}
try
{
- // Format for GetEnvironmentStrings is:
- // [=HiddenVar=value\0]* [Variable=value\0]* \0
- // See the description of Environment Blocks in MSDN's
- // CreateProcess page (null-terminated array of null-terminated strings).
-
- // Search for terminating \0\0 (two unicode \0's).
- char* p = pStrings;
- while (!(*p == '\0' && *(p + 1) == '\0'))
- {
- p++;
- }
- Span block = new Span(pStrings, (int)(p - pStrings + 1));
-
- // Format for GetEnvironmentStrings is:
- // (=HiddenVar=value\0 | Variable=value\0)* \0
- // See the description of Environment Blocks in MSDN's
- // CreateProcess page (null-terminated array of null-terminated strings).
- // Note the =HiddenVar's aren't always at the beginning.
-
- // Copy strings out, parsing into pairs and inserting into the table.
- // The first few environment variable entries start with an '='.
- // The current working directory of every drive (except for those drives
- // you haven't cd'ed into in your DOS window) are stored in the
- // environment block (as =C:=pwd) and the program's exit code is
- // as well (=ExitCode=00000000).
-
var results = new Hashtable();
- for (int i = 0; i < block.Length; i++)
- {
- int startKey = i;
- // Skip to key. On some old OS, the environment block can be corrupted.
- // Some will not have '=', so we need to check for '\0'.
- while (block[i] != '=' && block[i] != '\0')
+ char* currentPtr = stringPtr;
+ while (true)
+ {
+ int variableLength = string.wcslen(currentPtr);
+ if (variableLength == 0)
{
- i++;
+ break;
}
- if (block[i] == '\0')
- {
- continue;
- }
+ var variable = new ReadOnlySpan(currentPtr, variableLength);
- // Skip over environment variables starting with '='
- if (i - startKey == 0)
+ // Find the = separating the key and value. We skip entries that begin with =. We also skip entries that don't
+ // have =, which can happen on some older OSes when the environment block gets corrupted.
+ int i = variable.IndexOf('=');
+ if (i > 0)
{
- while (block[i] != 0)
+ // Add the key and value.
+ string key = new string(variable.Slice(0, i));
+ string value = new string(variable.Slice(i + 1));
+ try
{
- i++;
+ // Add may throw if the environment block was corrupted leading to duplicate entries.
+ // We allow such throws and eat them (rather than proactively checking for duplication)
+ // to provide a non-fatal notification about the corruption.
+ results.Add(key, value);
}
-
- continue;
+ catch (ArgumentException) { }
}
- string key = new string(block.Slice(startKey, i - startKey));
- i++; // skip over '='
-
- int startValue = i;
- while (block[i] != 0)
- {
- i++; // Read to end of this entry
- }
-
- string value = new string(block.Slice(startValue, i - startValue)); // skip over 0 handled by for loop's i++
- try
- {
- results.Add(key, value);
- }
- catch (ArgumentException)
- {
- // Throw and catch intentionally to provide non-fatal notification about corrupted environment block
- }
+ // Move to the end of this variable, after its terminator.
+ currentPtr += variableLength + 1;
}
+
return results;
}
finally
{
- bool success = Interop.Kernel32.FreeEnvironmentStrings(pStrings);
- Debug.Assert(success);
+ Interop.BOOL success = Interop.Kernel32.FreeEnvironmentStringsW(stringPtr);
+ Debug.Assert(success != Interop.BOOL.FALSE);
}
}
}
diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Icu.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Icu.cs
index faa339fcc3000..855d11a0fcb68 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Icu.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Icu.cs
@@ -235,11 +235,48 @@ private static int IcuGetGeoId(string cultureName)
return geoId == -1 ? CultureData.Invariant.GeoId : geoId;
}
+ private const uint DigitSubstitutionMask = 0x0000FFFF;
+ private const uint ListSeparatorMask = 0xFFFF0000;
+
private static int IcuGetDigitSubstitution(string cultureName)
{
Debug.Assert(!GlobalizationMode.UseNls);
- int digitSubstitution = IcuLocaleData.GetLocaleDataNumericPart(cultureName, IcuLocaleDataParts.DigitSubstitution);
- return digitSubstitution == -1 ? (int) DigitShapes.None : digitSubstitution;
+ int digitSubstitution = IcuLocaleData.GetLocaleDataNumericPart(cultureName, IcuLocaleDataParts.DigitSubstitutionOrListSeparator);
+ return digitSubstitution == -1 ? (int) DigitShapes.None : (int)(digitSubstitution & DigitSubstitutionMask);
+ }
+
+ private static string IcuGetListSeparator(string? cultureName)
+ {
+ Debug.Assert(!GlobalizationMode.UseNls);
+ Debug.Assert(cultureName != null);
+
+ int separator = IcuLocaleData.GetLocaleDataNumericPart(cultureName, IcuLocaleDataParts.DigitSubstitutionOrListSeparator);
+ if (separator != -1)
+ {
+ switch (separator & ListSeparatorMask)
+ {
+ case IcuLocaleData.CommaSep:
+ return ",";
+
+ case IcuLocaleData.SemicolonSep:
+ return ";";
+
+ case IcuLocaleData.ArabicCommaSep:
+ return "\u060C";
+
+ case IcuLocaleData.ArabicSemicolonSep:
+ return "\u061B";
+
+ case IcuLocaleData.DoubleCommaSep:
+ return ",,";
+
+ default:
+ Debug.Assert(false, "[CultureData.IcuGetListSeparator] Unexpected ListSeparator value.");
+ break;
+ }
+ }
+
+ return ","; // default separator
}
private static string IcuGetThreeLetterWindowsLanguageName(string cultureName)
diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.cs
index 939c16e4d8d9a..76e95e087dd3a 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.cs
@@ -1378,7 +1378,7 @@ internal int MeasurementSystem
/// list Separator
/// (user can override)
///
- internal string ListSeparator => _sListSeparator ??= GetLocaleInfoCoreUserOverride(LocaleStringData.ListSeparator);
+ internal string ListSeparator => _sListSeparator ??= ShouldUseUserOverrideNlsData ? NlsGetLocaleInfo(LocaleStringData.ListSeparator) : IcuGetListSeparator(_sWindowsName);
///
/// AM designator
diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/IcuLocaleData.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/IcuLocaleData.cs
index 0c122978e6033..99cdc9775c9ae 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Globalization/IcuLocaleData.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/IcuLocaleData.cs
@@ -17,7 +17,7 @@ internal enum IcuLocaleDataParts
MacCodePage = 3,
EbcdicCodePage = 4,
GeoId = 5,
- DigitSubstitution = 6,
+ DigitSubstitutionOrListSeparator = 6,
SpecificLocaleIndex = 7,
ConsoleLocaleIndex = 8
}
@@ -2639,876 +2639,883 @@ internal static class IcuLocaleData
};
private const int NUMERIC_LOCALE_DATA_COUNT_PER_ROW = 9;
+
+ internal const int CommaSep = 0 << 16;
+ internal const int SemicolonSep = 1 << 16;
+ internal const int ArabicCommaSep = 2 << 16;
+ internal const int ArabicSemicolonSep = 3 << 16;
+ internal const int DoubleCommaSep = 4 << 16;
+
// s_nameIndexToNumericData is mapping from index in s_localeNamesIndices to locale data.
// each row in the table will have the following data:
- // Lcid, Ansi codepage, Oem codepage, MAC codepage, EBCDIC codepage, Geo Id, Digit Substitution, specific locale index, Console locale index
+ // Lcid, Ansi codepage, Oem codepage, MAC codepage, EBCDIC codepage, Geo Id, Digit Substitution | ListSeparator, specific locale index, Console locale index
private static readonly int[] s_nameIndexToNumericData = new int[]
{
- // Lcid, Ansi CP, Oem CP, MAC CP, EBCDIC CP, Geo Id, digit substitution, Specific culture index, keyboard Id, Console locale index // index - locale name
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x49 , 1 , 3 , 240 , // 0 - aa
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x3e , 1 , 1 , 240 , // 1 - aa-dj
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x47 , 1 , 2 , 240 , // 2 - aa-er
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x49 , 1 , 3 , 240 , // 3 - aa-et
- 0x36 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd1 , 1 , 6 , 6 , // 4 - af
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xfe , 1 , 5 , 240 , // 5 - af-na
- 0x436 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd1 , 1 , 6 , 6 , // 6 - af-za
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 , 8 , 240 , // 7 - agq
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 , 8 , 240 , // 8 - agq-cm
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x59 , 1 , 10 , 240 , // 9 - ak
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x59 , 1 , 10 , 240 , // 10 - ak-gh
- 0x5e , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x49 , 1 , 12 , 143 , // 11 - am
- 0x45e , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x49 , 1 , 12 , 143 , // 12 - am-et
- 0x1 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xcd , 0 , 33 , 143 , // 13 - ar
- 0x1000 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x989e, 0 , 14 , 240 , // 14 - ar-001
- 0x3801 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xe0 , 0 , 15 , 143 , // 15 - ar-ae
- 0x3c01 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x11 , 0 , 16 , 143 , // 16 - ar-bh
- 0x1000 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x3e , 0 , 17 , 240 , // 17 - ar-dj
- 0x1401 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x4 , 1 , 18 , 300 , // 18 - ar-dz
- 0xc01 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x43 , 0 , 19 , 143 , // 19 - ar-eg
- 0x1000 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x47 , 0 , 20 , 240 , // 20 - ar-er
- 0x1000 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x75 , 0 , 21 , 240 , // 21 - ar-il
- 0x801 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x79 , 0 , 22 , 143 , // 22 - ar-iq
- 0x2c01 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x7e , 0 , 23 , 143 , // 23 - ar-jo
- 0x1000 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x32 , 0 , 24 , 240 , // 24 - ar-km
- 0x3401 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x88 , 0 , 25 , 143 , // 25 - ar-kw
- 0x3001 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x8b , 0 , 26 , 143 , // 26 - ar-lb
- 0x1001 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x94 , 1 , 27 , 143 , // 27 - ar-ly
- 0x1801 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x9f , 1 , 28 , 300 , // 28 - ar-ma
- 0x1000 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xa2 , 0 , 29 , 240 , // 29 - ar-mr
- 0x2001 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xa4 , 0 , 30 , 143 , // 30 - ar-om
- 0x1000 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xb8 , 0 , 31 , 240 , // 31 - ar-ps
- 0x4001 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xc5 , 0 , 32 , 143 , // 32 - ar-qa
- 0x401 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xcd , 0 , 33 , 143 , // 33 - ar-sa
- 0x1000 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xdb , 0 , 34 , 240 , // 34 - ar-sd
- 0x1000 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xd8 , 0 , 35 , 240 , // 35 - ar-so
- 0x1000 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x114 , 0 , 36 , 240 , // 36 - ar-ss
- 0x2801 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xde , 0 , 37 , 143 , // 37 - ar-sy
- 0x1000 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x29 , 0 , 38 , 240 , // 38 - ar-td
- 0x1c01 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xea , 1 , 39 , 300 , // 39 - ar-tn
- 0x2401 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x105 , 0 , 40 , 143 , // 40 - ar-ye
- 0x7a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x2e , 1 , 42 , 42 , // 41 - arn
- 0x47a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x2e , 1 , 42 , 42 , // 42 - arn-cl
- 0x4d , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 44 , 143 , // 43 - as
- 0x44d , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 44 , 143 , // 44 - as-in
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 , 46 , 240 , // 45 - asa
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 , 46 , 240 , // 46 - asa-tz
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd9 , 1 , 48 , 240 , // 47 - ast
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd9 , 1 , 48 , 240 , // 48 - ast-es
- 0x2c , 0x4e6 , 0x359 , 0x2761, 0x51a9, 0x5 , 1 , 53 , 53 , // 49 - az
- 0x742c , 0x4e3 , 0x362 , 0x2717, 0x5190, 0x5 , 1 , 51 , 51 , // 50 - az-cyrl
- 0x82c , 0x4e3 , 0x362 , 0x2717, 0x5190, 0x5 , 1 , 51 , 51 , // 51 - az-cyrl-az
- 0x782c , 0x4e6 , 0x359 , 0x2761, 0x51a9, 0x5 , 1 , 53 , 53 , // 52 - az-latn
- 0x42c , 0x4e6 , 0x359 , 0x2761, 0x51a9, 0x5 , 1 , 53 , 53 , // 53 - az-latn-az
- 0x6d , 0x4e3 , 0x362 , 0x2717, 0x5190, 0xcb , 1 , 55 , 55 , // 54 - ba
- 0x46d , 0x4e3 , 0x362 , 0x2717, 0x5190, 0xcb , 1 , 55 , 55 , // 55 - ba-ru
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 , 57 , 240 , // 56 - bas
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 , 57 , 240 , // 57 - bas-cm
- 0x23 , 0x4e3 , 0x362 , 0x2717, 0x1f4 , 0x1d , 1 , 59 , 59 , // 58 - be
- 0x423 , 0x4e3 , 0x362 , 0x2717, 0x1f4 , 0x1d , 1 , 59 , 59 , // 59 - be-by
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x107 , 1 , 61 , 240 , // 60 - bem
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x107 , 1 , 61 , 240 , // 61 - bem-zm
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 , 63 , 240 , // 62 - bez
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 , 63 , 240 , // 63 - bez-tz
- 0x2 , 0x4e3 , 0x362 , 0x2717, 0x5221, 0x23 , 1 , 65 , 65 , // 64 - bg
- 0x402 , 0x4e3 , 0x362 , 0x2717, 0x5221, 0x23 , 1 , 65 , 65 , // 65 - bg-bg
- 0x66 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xaf , 1 , 67 , 240 , // 66 - bin
- 0x466 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xaf , 1 , 67 , 240 , // 67 - bin-ng
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9d , 1 , 70 , 240 , // 68 - bm
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9d , 1 , 70 , 240 , // 69 - bm-latn
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9d , 1 , 70 , 240 , // 70 - bm-latn-ml
- 0x45 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x17 , 1 , 72 , 143 , // 71 - bn
- 0x845 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x17 , 1 , 72 , 143 , // 72 - bn-bd
- 0x445 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 73 , 143 , // 73 - bn-in
- 0x51 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x2d , 1 , 75 , 143 , // 74 - bo
- 0x451 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x2d , 1 , 75 , 143 , // 75 - bo-cn
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 76 , 240 , // 76 - bo-in
- 0x7e , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x54 , 1 , 78 , 78 , // 77 - br
- 0x47e , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x54 , 1 , 78 , 78 , // 78 - br-fr
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 80 , 240 , // 79 - brx
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 80 , 240 , // 80 - brx-in
- 0x781a , 0x4e2 , 0x354 , 0x2762, 0x366 , 0x19 , 1 , 85 , 85 , // 81 - bs
- 0x641a , 0x4e3 , 0x357 , 0x2762, 0x366 , 0x19 , 1 , 83 , 83 , // 82 - bs-cyrl
- 0x201a , 0x4e3 , 0x357 , 0x2762, 0x366 , 0x19 , 1 , 83 , 83 , // 83 - bs-cyrl-ba
- 0x681a , 0x4e2 , 0x354 , 0x2762, 0x366 , 0x19 , 1 , 85 , 85 , // 84 - bs-latn
- 0x141a , 0x4e2 , 0x354 , 0x2762, 0x366 , 0x19 , 1 , 85 , 85 , // 85 - bs-latn-ba
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x47 , 1 , 87 , 240 , // 86 - byn
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x47 , 1 , 87 , 240 , // 87 - byn-er
- 0x3 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd9 , 1 , 90 , 90 , // 88 - ca
- 0x1000 , 0x4e4 , 0x352 , 0x2 , 0x1f4 , 0x8 , 1 , 89 , 240 , // 89 - ca-ad
- 0x403 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd9 , 1 , 90 , 90 , // 90 - ca-es
- 0x803 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd9 , 1 , 91 , 90 , // 91 - ca-es-valencia
- 0x1000 , 0x4e4 , 0x352 , 0x2 , 0x1f4 , 0x54 , 1 , 92 , 240 , // 92 - ca-fr
- 0x1000 , 0x4e4 , 0x352 , 0x2 , 0x1f4 , 0x76 , 1 , 93 , 240 , // 93 - ca-it
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xcb , 1 , 95 , 240 , // 94 - ce
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xcb , 1 , 95 , 240 , // 95 - ce-ru
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf0 , 1 , 97 , 240 , // 96 - cgg
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf0 , 1 , 97 , 240 , // 97 - cgg-ug
- 0x5c , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf4 , 1 , 100 , 240 , // 98 - chr
- 0x7c5c , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf4 , 1 , 100 , 240 , // 99 - chr-cher
- 0x45c , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf4 , 1 , 100 , 240 , // 100 - chr-cher-us
- 0x83 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x54 , 1 , 102 , 102 , // 101 - co
- 0x483 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x54 , 1 , 102 , 102 , // 102 - co-fr
- 0x5 , 0x4e2 , 0x354 , 0x272d, 0x1f4 , 0x4b , 1 , 104 , 104 , // 103 - cs
- 0x405 , 0x4e2 , 0x354 , 0x272d, 0x1f4 , 0x4b , 1 , 104 , 104 , // 104 - cs-cz
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xcb , 1 , 106 , 240 , // 105 - cu
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xcb , 1 , 106 , 240 , // 106 - cu-ru
- 0x52 , 0x4e4 , 0x352 , 0x2710, 0x4f3d, 0xf2 , 1 , 108 , 108 , // 107 - cy
- 0x452 , 0x4e4 , 0x352 , 0x2710, 0x4f3d, 0xf2 , 1 , 108 , 108 , // 108 - cy-gb
- 0x6 , 0x4e4 , 0x352 , 0x2710, 0x4f35, 0x3d , 1 , 110 , 110 , // 109 - da
- 0x406 , 0x4e4 , 0x352 , 0x2710, 0x4f35, 0x3d , 1 , 110 , 110 , // 110 - da-dk
- 0x1000 , 0x4e4 , 0x352 , 0x2 , 0x1f4 , 0x5d , 1 , 111 , 240 , // 111 - da-gl
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 , 113 , 240 , // 112 - dav
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 , 113 , 240 , // 113 - dav-ke
- 0x7 , 0x4e4 , 0x352 , 0x2710, 0x4f31, 0x5e , 1 , 118 , 118 , // 114 - de
- 0xc07 , 0x4e4 , 0x352 , 0x2710, 0x4f31, 0xe , 1 , 115 , 115 , // 115 - de-at
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f31, 0x15 , 1 , 116 , 240 , // 116 - de-be
- 0x807 , 0x4e4 , 0x352 , 0x2710, 0x4f31, 0xdf , 1 , 117 , 117 , // 117 - de-ch
- 0x407 , 0x4e4 , 0x352 , 0x2710, 0x4f31, 0x5e , 1 , 118 , 118 , // 118 - de-de
- 0x10407, 0x4e4 , 0x352 , 0x2710, 0x4f31, 0x5e , 1 , 118 , 118 , // 119 - de-de_phoneb
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x76 , 1 , 120 , 240 , // 120 - de-it
- 0x1407 , 0x4e4 , 0x352 , 0x2710, 0x4f31, 0x91 , 1 , 121 , 121 , // 121 - de-li
- 0x1007 , 0x4e4 , 0x352 , 0x2710, 0x4f31, 0x93 , 1 , 122 , 122 , // 122 - de-lu
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xad , 1 , 124 , 240 , // 123 - dje
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xad , 1 , 124 , 240 , // 124 - dje-ne
- 0x7c2e , 0x4e4 , 0x352 , 0x2710, 0x366 , 0x5e , 1 , 126 , 126 , // 125 - dsb
- 0x82e , 0x4e4 , 0x352 , 0x2710, 0x366 , 0x5e , 1 , 126 , 126 , // 126 - dsb-de
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 , 128 , 240 , // 127 - dua
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 , 128 , 240 , // 128 - dua-cm
- 0x65 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xa5 , 1 , 130 , 143 , // 129 - dv
- 0x465 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xa5 , 1 , 130 , 143 , // 130 - dv-mv
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd2 , 1 , 132 , 240 , // 131 - dyo
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd2 , 1 , 132 , 240 , // 132 - dyo-sn
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x22 , 2 , 134 , 240 , // 133 - dz
- 0xc51 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x22 , 2 , 134 , 240 , // 134 - dz-bt
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 , 136 , 240 , // 135 - ebu
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 , 136 , 240 , // 136 - ebu-ke
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x59 , 1 , 138 , 240 , // 137 - ee
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x59 , 1 , 138 , 240 , // 138 - ee-gh
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xe8 , 1 , 139 , 240 , // 139 - ee-tg
- 0x8 , 0x4e5 , 0x2e1 , 0x2716, 0x4f31, 0x62 , 1 , 142 , 142 , // 140 - el
- 0x1000 , 0x4e5 , 0x2e1 , 0x2716, 0x4f31, 0x3b , 1 , 141 , 240 , // 141 - el-cy
- 0x408 , 0x4e5 , 0x2e1 , 0x2716, 0x4f31, 0x62 , 1 , 142 , 142 , // 142 - el-gr
- 0x9 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xf4 , 1 , 240 , 240 , // 143 - en
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x989e, 1 , 144 , 240 , // 144 - en-001
- 0x2409 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x993248, 1 , 145 , 145 , // 145 - en-029
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x292d, 1 , 146 , 240 , // 146 - en-150
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x2 , 1 , 147 , 240 , // 147 - en-ag
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x12c , 1 , 148 , 240 , // 148 - en-ai
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xa , 1 , 149 , 240 , // 149 - en-as
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xe , 1 , 150 , 240 , // 150 - en-at
- 0xc09 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xc , 1 , 151 , 151 , // 151 - en-au
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x12 , 1 , 152 , 240 , // 152 - en-bb
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x15 , 1 , 153 , 240 , // 153 - en-be
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x26 , 1 , 154 , 240 , // 154 - en-bi
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x14 , 1 , 155 , 240 , // 155 - en-bm
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x16 , 1 , 156 , 240 , // 156 - en-bs
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x13 , 1 , 157 , 240 , // 157 - en-bw
- 0x2809 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x18 , 1 , 158 , 158 , // 158 - en-bz
- 0x1009 , 0x4e4 , 0x352 , 0x2710, 0x25 , 0x27 , 1 , 159 , 159 , // 159 - en-ca
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x137 , 1 , 160 , 240 , // 160 - en-cc
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xdf , 1 , 161 , 240 , // 161 - en-ch
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x138 , 1 , 162 , 240 , // 162 - en-ck
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x31 , 1 , 163 , 240 , // 163 - en-cm
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x135 , 1 , 164 , 240 , // 164 - en-cx
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x3b , 1 , 165 , 240 , // 165 - en-cy
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x5e , 1 , 166 , 240 , // 166 - en-de
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x3d , 1 , 167 , 240 , // 167 - en-dk
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x3f , 1 , 168 , 240 , // 168 - en-dm
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x47 , 1 , 169 , 240 , // 169 - en-er
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x4d , 1 , 170 , 240 , // 170 - en-fi
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x4e , 1 , 171 , 240 , // 171 - en-fj
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x13b , 1 , 172 , 240 , // 172 - en-fk
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x50 , 1 , 173 , 240 , // 173 - en-fm
- 0x809 , 0x4e4 , 0x352 , 0x2710, 0x4f3d, 0xf2 , 1 , 174 , 174 , // 174 - en-gb
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x5b , 1 , 175 , 240 , // 175 - en-gd
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x144 , 1 , 176 , 240 , // 176 - en-gg
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x59 , 1 , 177 , 240 , // 177 - en-gh
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x5a , 1 , 178 , 240 , // 178 - en-gi
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x56 , 1 , 179 , 240 , // 179 - en-gm
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x142 , 1 , 180 , 240 , // 180 - en-gu
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x65 , 1 , 181 , 240 , // 181 - en-gy
- 0x3c09 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x68 , 1 , 182 , 240 , // 182 - en-hk
- 0x3809 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x6f , 1 , 183 , 240 , // 183 - en-id
- 0x1809 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x44 , 1 , 184 , 184 , // 184 - en-ie
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x75 , 1 , 185 , 240 , // 185 - en-il
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x3b16, 1 , 186 , 240 , // 186 - en-im
- 0x4009 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0x71 , 1 , 187 , 187 , // 187 - en-in
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x72 , 1 , 188 , 240 , // 188 - en-io
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x148 , 1 , 189 , 240 , // 189 - en-je
- 0x2009 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x7c , 1 , 190 , 190 , // 190 - en-jm
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x81 , 1 , 191 , 240 , // 191 - en-ke
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x85 , 1 , 192 , 240 , // 192 - en-ki
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xcf , 1 , 193 , 240 , // 193 - en-kn
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x133 , 1 , 194 , 240 , // 194 - en-ky
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xda , 1 , 195 , 240 , // 195 - en-lc
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x8e , 1 , 196 , 240 , // 196 - en-lr
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x92 , 1 , 197 , 240 , // 197 - en-ls
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x95 , 1 , 198 , 240 , // 198 - en-mg
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xc7 , 1 , 199 , 240 , // 199 - en-mh
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x97 , 1 , 200 , 240 , // 200 - en-mo
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x151 , 1 , 201 , 240 , // 201 - en-mp
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x14c , 1 , 202 , 240 , // 202 - en-ms
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xa3 , 1 , 203 , 240 , // 203 - en-mt
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xa0 , 1 , 204 , 240 , // 204 - en-mu
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x9c , 1 , 205 , 240 , // 205 - en-mw
- 0x4409 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xa7 , 1 , 206 , 206 , // 206 - en-my
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xfe , 1 , 207 , 240 , // 207 - en-na
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x150 , 1 , 208 , 240 , // 208 - en-nf
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xaf , 1 , 209 , 240 , // 209 - en-ng
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xb0 , 1 , 210 , 240 , // 210 - en-nl
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xb4 , 1 , 211 , 240 , // 211 - en-nr
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x14f , 1 , 212 , 240 , // 212 - en-nu
- 0x1409 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xb7 , 1 , 213 , 213 , // 213 - en-nz
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xc2 , 1 , 214 , 240 , // 214 - en-pg
- 0x3409 , 0x4e4 , 0x1b5 , 0x2710, 0x1f4 , 0xc9 , 1 , 215 , 215 , // 215 - en-ph
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xbe , 1 , 216 , 240 , // 216 - en-pk
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x153 , 1 , 217 , 240 , // 217 - en-pn
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xca , 1 , 218 , 240 , // 218 - en-pr
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xc3 , 1 , 219 , 240 , // 219 - en-pw
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xcc , 1 , 220 , 240 , // 220 - en-rw
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x1e , 1 , 221 , 240 , // 221 - en-sb
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd0 , 1 , 222 , 240 , // 222 - en-sc
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xdb , 1 , 223 , 240 , // 223 - en-sd
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xdd , 1 , 224 , 240 , // 224 - en-se
- 0x4809 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xd7 , 1 , 225 , 225 , // 225 - en-sg
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x157 , 1 , 226 , 240 , // 226 - en-sh
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd4 , 1 , 227 , 240 , // 227 - en-si
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd5 , 1 , 228 , 240 , // 228 - en-sl
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x114 , 1 , 229 , 240 , // 229 - en-ss
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x78f7, 1 , 230 , 240 , // 230 - en-sx
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x104 , 1 , 231 , 240 , // 231 - en-sz
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x15d , 1 , 232 , 240 , // 232 - en-tc
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x15b , 1 , 233 , 240 , // 233 - en-tk
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xe7 , 1 , 234 , 240 , // 234 - en-to
- 0x2c09 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xe1 , 1 , 235 , 235 , // 235 - en-tt
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xec , 1 , 236 , 240 , // 236 - en-tv
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xef , 1 , 237 , 240 , // 237 - en-tz
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xf0 , 1 , 238 , 240 , // 238 - en-ug
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x9a55d40, 1 , 239 , 240 , // 239 - en-um
- 0x409 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xf4 , 1 , 240 , 240 , // 240 - en-us
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xf8 , 1 , 241 , 240 , // 241 - en-vc
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x15f , 1 , 242 , 240 , // 242 - en-vg
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xfc , 1 , 243 , 240 , // 243 - en-vi
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xae , 1 , 244 , 240 , // 244 - en-vu
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x103 , 1 , 245 , 240 , // 245 - en-ws
- 0x1c09 , 0x4e4 , 0x1b5 , 0x2710, 0x1f4 , 0xd1 , 1 , 246 , 246 , // 246 - en-za
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x107 , 1 , 247 , 240 , // 247 - en-zm
- 0x3009 , 0x4e4 , 0x1b5 , 0x2710, 0x1f4 , 0x108 , 1 , 248 , 248 , // 248 - en-zw
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x989e, 1 , 250 , 240 , // 249 - eo
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x989e, 1 , 250 , 240 , // 250 - eo-001
- 0xa , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xd9 , 1 , 262 , 262 , // 251 - es
- 0x580a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x9a55d41, 1 , 252 , 240 , // 252 - es-419
- 0x2c0a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xb , 1 , 253 , 253 , // 253 - es-ar
- 0x400a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x1a , 1 , 254 , 254 , // 254 - es-bo
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x20 , 1 , 255 , 240 , // 255 - es-br
- 0x340a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x2e , 1 , 256 , 256 , // 256 - es-cl
- 0x240a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x33 , 1 , 257 , 257 , // 257 - es-co
- 0x140a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x36 , 1 , 258 , 258 , // 258 - es-cr
- 0x5c0a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x38 , 1 , 259 , 240 , // 259 - es-cu
- 0x1c0a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x41 , 1 , 260 , 260 , // 260 - es-do
- 0x300a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x42 , 1 , 261 , 261 , // 261 - es-ec
- 0xc0a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xd9 , 1 , 262 , 262 , // 262 - es-es
- 0x40a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xd9 , 1 , 263 , 263 , // 263 - es-es_tradnl
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x45 , 1 , 264 , 240 , // 264 - es-gq
- 0x100a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x63 , 1 , 265 , 265 , // 265 - es-gt
- 0x480a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x6a , 1 , 266 , 266 , // 266 - es-hn
- 0x80a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xa6 , 1 , 267 , 267 , // 267 - es-mx
- 0x4c0a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xb6 , 1 , 268 , 268 , // 268 - es-ni
- 0x180a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xc0 , 1 , 269 , 269 , // 269 - es-pa
- 0x280a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xbb , 1 , 270 , 270 , // 270 - es-pe
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xc9 , 1 , 271 , 240 , // 271 - es-ph
- 0x500a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xca , 1 , 272 , 272 , // 272 - es-pr
- 0x3c0a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xb9 , 1 , 273 , 273 , // 273 - es-py
- 0x440a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x48 , 1 , 274 , 274 , // 274 - es-sv
- 0x540a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xf4 , 1 , 275 , 275 , // 275 - es-us
- 0x380a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xf6 , 1 , 276 , 276 , // 276 - es-uy
- 0x200a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xf9 , 1 , 277 , 277 , // 277 - es-ve
- 0x25 , 0x4e9 , 0x307 , 0x272d, 0x1f4 , 0x46 , 1 , 279 , 279 , // 278 - et
- 0x425 , 0x4e9 , 0x307 , 0x272d, 0x1f4 , 0x46 , 1 , 279 , 279 , // 279 - et-ee
- 0x2d , 0x4e4 , 0x352 , 0x2 , 0x1f4 , 0xd9 , 1 , 281 , 240 , // 280 - eu
- 0x42d , 0x4e4 , 0x352 , 0x2 , 0x1f4 , 0xd9 , 1 , 281 , 240 , // 281 - eu-es
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 , 283 , 240 , // 282 - ewo
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 , 283 , 240 , // 283 - ewo-cm
- 0x29 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x74 , 0 , 285 , 143 , // 284 - fa
- 0x429 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x74 , 0 , 285 , 143 , // 285 - fa-ir
- 0x67 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xd2 , 1 , 290 , 290 , // 286 - ff
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x31 , 1 , 287 , 240 , // 287 - ff-cm
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x64 , 1 , 288 , 240 , // 288 - ff-gn
- 0x7c67 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xd2 , 1 , 290 , 290 , // 289 - ff-latn
- 0x867 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xd2 , 1 , 290 , 290 , // 290 - ff-latn-sn
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xa2 , 1 , 291 , 240 , // 291 - ff-mr
- 0x467 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xaf , 1 , 292 , 240 , // 292 - ff-ng
- 0xb , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0x4d , 1 , 294 , 294 , // 293 - fi
- 0x40b , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0x4d , 1 , 294 , 294 , // 294 - fi-fi
- 0x64 , 0x4e4 , 0x1b5 , 0x2710, 0x1f4 , 0xc9 , 1 , 296 , 296 , // 295 - fil
- 0x464 , 0x4e4 , 0x1b5 , 0x2710, 0x1f4 , 0xc9 , 1 , 296 , 296 , // 296 - fil-ph
- 0x38 , 0x4e4 , 0x352 , 0x275f, 0x4f35, 0x51 , 1 , 299 , 299 , // 297 - fo
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x3d , 1 , 298 , 240 , // 298 - fo-dk
- 0x438 , 0x4e4 , 0x352 , 0x275f, 0x4f35, 0x51 , 1 , 299 , 299 , // 299 - fo-fo
- 0xc , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x54 , 1 , 316 , 316 , // 300 - fr
- 0x1c0c , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x993248, 1 , 301 , 316 , // 301 - fr-029
- 0x80c , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x15 , 1 , 302 , 302 , // 302 - fr-be
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xf5 , 1 , 303 , 240 , // 303 - fr-bf
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x26 , 1 , 304 , 240 , // 304 - fr-bi
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x1c , 1 , 305 , 240 , // 305 - fr-bj
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x9a55c4f, 1 , 306 , 240 , // 306 - fr-bl
- 0xc0c , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x27 , 1 , 307 , 307 , // 307 - fr-ca
- 0x240c , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x2c , 1 , 308 , 240 , // 308 - fr-cd
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x37 , 1 , 309 , 240 , // 309 - fr-cf
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x2b , 1 , 310 , 240 , // 310 - fr-cg
- 0x100c , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xdf , 1 , 311 , 311 , // 311 - fr-ch
- 0x300c , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x77 , 1 , 312 , 240 , // 312 - fr-ci
- 0x2c0c , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x31 , 1 , 313 , 240 , // 313 - fr-cm
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x3e , 1 , 314 , 240 , // 314 - fr-dj
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x4 , 1 , 315 , 240 , // 315 - fr-dz
- 0x40c , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x54 , 1 , 316 , 316 , // 316 - fr-fr
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x57 , 1 , 317 , 240 , // 317 - fr-ga
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x13d , 1 , 318 , 240 , // 318 - fr-gf
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x64 , 1 , 319 , 240 , // 319 - fr-gn
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x141 , 1 , 320 , 240 , // 320 - fr-gp
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x45 , 1 , 321 , 240 , // 321 - fr-gq
- 0x3c0c , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x67 , 1 , 322 , 240 , // 322 - fr-ht
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x32 , 1 , 323 , 240 , // 323 - fr-km
- 0x140c , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x93 , 1 , 324 , 324 , // 324 - fr-lu
- 0x380c , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x9f , 1 , 325 , 240 , // 325 - fr-ma
- 0x180c , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x9e , 1 , 326 , 326 , // 326 - fr-mc
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x7bda, 1 , 327 , 240 , // 327 - fr-mf
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x95 , 1 , 328 , 240 , // 328 - fr-mg
- 0x340c , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x9d , 1 , 329 , 240 , // 329 - fr-ml
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x14a , 1 , 330 , 240 , // 330 - fr-mq
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xa2 , 1 , 331 , 240 , // 331 - fr-mr
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xa0 , 1 , 332 , 240 , // 332 - fr-mu
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x14e , 1 , 333 , 240 , // 333 - fr-nc
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xad , 1 , 334 , 240 , // 334 - fr-ne
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x13e , 1 , 335 , 240 , // 335 - fr-pf
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xce , 1 , 336 , 240 , // 336 - fr-pm
- 0x200c , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xc6 , 1 , 337 , 240 , // 337 - fr-re
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xcc , 1 , 338 , 240 , // 338 - fr-rw
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xd0 , 1 , 339 , 240 , // 339 - fr-sc
- 0x280c , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xd2 , 1 , 340 , 240 , // 340 - fr-sn
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xde , 1 , 341 , 240 , // 341 - fr-sy
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x29 , 1 , 342 , 240 , // 342 - fr-td
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xe8 , 1 , 343 , 240 , // 343 - fr-tg
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xea , 1 , 344 , 240 , // 344 - fr-tn
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xae , 1 , 345 , 240 , // 345 - fr-vu
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x160 , 1 , 346 , 240 , // 346 - fr-wf
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x14b , 1 , 347 , 240 , // 347 - fr-yt
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x76 , 1 , 349 , 240 , // 348 - fur
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x76 , 1 , 349 , 240 , // 349 - fur-it
- 0x62 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xb0 , 1 , 351 , 351 , // 350 - fy
- 0x462 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xb0 , 1 , 351 , 351 , // 351 - fy-nl
- 0x3c , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x44 , 1 , 353 , 353 , // 352 - ga
- 0x83c , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x44 , 1 , 353 , 353 , // 353 - ga-ie
- 0x91 , 0x4e4 , 0x352 , 0x2710, 0x4f3d, 0xf2 , 1 , 355 , 355 , // 354 - gd
- 0x491 , 0x4e4 , 0x352 , 0x2710, 0x4f3d, 0xf2 , 1 , 355 , 355 , // 355 - gd-gb
- 0x56 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd9 , 1 , 357 , 357 , // 356 - gl
- 0x456 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd9 , 1 , 357 , 357 , // 357 - gl-es
- 0x74 , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xb9 , 1 , 359 , 359 , // 358 - gn
- 0x474 , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xb9 , 1 , 359 , 359 , // 359 - gn-py
- 0x84 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xdf , 1 , 361 , 240 , // 360 - gsw
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xdf , 1 , 361 , 240 , // 361 - gsw-ch
- 0x484 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x54 , 1 , 362 , 362 , // 362 - gsw-fr
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x91 , 1 , 363 , 240 , // 363 - gsw-li
- 0x47 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 365 , 143 , // 364 - gu
- 0x447 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 365 , 143 , // 365 - gu-in
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 , 367 , 240 , // 366 - guz
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 , 367 , 240 , // 367 - guz-ke
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x3b16, 1 , 369 , 240 , // 368 - gv
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x3b16, 1 , 369 , 240 , // 369 - gv-im
- 0x68 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xaf , 1 , 374 , 374 , // 370 - ha
- 0x7c68 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xaf , 1 , 374 , 374 , // 371 - ha-latn
- 0x1000 , 0x4e4 , 0x1b5 , 0x2710, 0x1f4 , 0x59 , 1 , 372 , 240 , // 372 - ha-latn-gh
- 0x1000 , 0x4e4 , 0x1b5 , 0x2710, 0x1f4 , 0xad , 1 , 373 , 240 , // 373 - ha-latn-ne
- 0x468 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xaf , 1 , 374 , 374 , // 374 - ha-latn-ng
- 0x75 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xf4 , 1 , 376 , 376 , // 375 - haw
- 0x475 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xf4 , 1 , 376 , 376 , // 376 - haw-us
- 0xd , 0x4e7 , 0x35e , 0x2715, 0x1f4 , 0x75 , 1 , 378 , 143 , // 377 - he
- 0x40d , 0x4e7 , 0x35e , 0x2715, 0x1f4 , 0x75 , 1 , 378 , 143 , // 378 - he-il
- 0x39 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 380 , 143 , // 379 - hi
- 0x439 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 380 , 143 , // 380 - hi-in
- 0x1a , 0x4e2 , 0x354 , 0x2762, 0x1f4 , 0x6c , 1 , 383 , 383 , // 381 - hr
- 0x101a , 0x4e2 , 0x354 , 0x2762, 0x366 , 0x19 , 1 , 382 , 382 , // 382 - hr-ba
- 0x41a , 0x4e2 , 0x354 , 0x2762, 0x1f4 , 0x6c , 1 , 383 , 383 , // 383 - hr-hr
- 0x2e , 0x4e4 , 0x352 , 0x2710, 0x366 , 0x5e , 1 , 385 , 385 , // 384 - hsb
- 0x42e , 0x4e4 , 0x352 , 0x2710, 0x366 , 0x5e , 1 , 385 , 385 , // 385 - hsb-de
- 0xe , 0x4e2 , 0x354 , 0x272d, 0x1f4 , 0x6d , 1 , 387 , 387 , // 386 - hu
- 0x40e , 0x4e2 , 0x354 , 0x272d, 0x1f4 , 0x6d , 1 , 387 , 387 , // 387 - hu-hu
- 0x1040e, 0x4e2 , 0x354 , 0x272d, 0x1f4 , 0x6d , 1 , 387 , 387 , // 388 - hu-hu_technl
- 0x2b , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x7 , 1 , 390 , 390 , // 389 - hy
- 0x42b , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x7 , 1 , 390 , 390 , // 390 - hy-am
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x54 , 1 , 393 , 240 , // 391 - ia
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x989e, 1 , 392 , 240 , // 392 - ia-001
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x54 , 1 , 393 , 240 , // 393 - ia-fr
- 0x69 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xaf , 1 , 395 , 240 , // 394 - ibb
- 0x469 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xaf , 1 , 395 , 240 , // 395 - ibb-ng
- 0x21 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x6f , 1 , 397 , 397 , // 396 - id
- 0x421 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x6f , 1 , 397 , 397 , // 397 - id-id
- 0x70 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xaf , 1 , 399 , 399 , // 398 - ig
- 0x470 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xaf , 1 , 399 , 399 , // 399 - ig-ng
- 0x78 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x2d , 1 , 401 , 143 , // 400 - ii
- 0x478 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x2d , 1 , 401 , 143 , // 401 - ii-cn
- 0xf , 0x4e4 , 0x352 , 0x275f, 0x5187, 0x6e , 1 , 403 , 403 , // 402 - is
- 0x40f , 0x4e4 , 0x352 , 0x275f, 0x5187, 0x6e , 1 , 403 , 403 , // 403 - is-is
- 0x10 , 0x4e4 , 0x352 , 0x2710, 0x4f38, 0x76 , 1 , 406 , 406 , // 404 - it
- 0x810 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xdf , 1 , 405 , 405 , // 405 - it-ch
- 0x410 , 0x4e4 , 0x352 , 0x2710, 0x4f38, 0x76 , 1 , 406 , 406 , // 406 - it-it
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f38, 0xd6 , 1 , 407 , 240 , // 407 - it-sm
- 0x5d , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0x27 , 1 , 412 , 412 , // 408 - iu
- 0x785d , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x27 , 1 , 410 , 143 , // 409 - iu-cans
- 0x45d , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x27 , 1 , 410 , 143 , // 410 - iu-cans-ca
- 0x7c5d , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0x27 , 1 , 412 , 412 , // 411 - iu-latn
- 0x85d , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0x27 , 1 , 412 , 412 , // 412 - iu-latn-ca
- 0x11 , 0x3a4 , 0x3a4 , 0x2711, 0x4f42, 0x7a , 1 , 414 , 414 , // 413 - ja
- 0x411 , 0x3a4 , 0x3a4 , 0x2711, 0x4f42, 0x7a , 1 , 414 , 414 , // 414 - ja-jp
- 0x40411, 0x3a4 , 0x3a4 , 0x2711, 0x4f42, 0x7a , 1 , 414 , 414 , // 415 - ja-jp_radstr
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 , 417 , 240 , // 416 - jgo
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 , 417 , 240 , // 417 - jgo-cm
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 , 419 , 240 , // 418 - jmc
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 , 419 , 240 , // 419 - jmc-tz
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x6f , 1 , 424 , 424 , // 420 - jv
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x6f , 1 , 422 , 424 , // 421 - jv-java
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x6f , 1 , 422 , 424 , // 422 - jv-java-id
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x6f , 1 , 424 , 424 , // 423 - jv-latn
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x6f , 1 , 424 , 424 , // 424 - jv-latn-id
- 0x37 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x58 , 1 , 426 , 426 , // 425 - ka
- 0x437 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x58 , 1 , 426 , 426 , // 426 - ka-ge
- 0x10437, 0x0 , 0x1 , 0x2 , 0x1f4 , 0x58 , 1 , 426 , 426 , // 427 - ka-ge_modern
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x4 , 1 , 429 , 240 , // 428 - kab
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x4 , 1 , 429 , 240 , // 429 - kab-dz
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 , 431 , 240 , // 430 - kam
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 , 431 , 240 , // 431 - kam-ke
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 , 433 , 240 , // 432 - kde
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 , 433 , 240 , // 433 - kde-tz
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x39 , 1 , 435 , 240 , // 434 - kea
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x39 , 1 , 435 , 240 , // 435 - kea-cv
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9d , 1 , 437 , 240 , // 436 - khq
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9d , 1 , 437 , 240 , // 437 - khq-ml
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 , 439 , 240 , // 438 - ki
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 , 439 , 240 , // 439 - ki-ke
- 0x3f , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x89 , 1 , 441 , 441 , // 440 - kk
- 0x43f , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x89 , 1 , 441 , 441 , // 441 - kk-kz
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 , 443 , 240 , // 442 - kkj
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 , 443 , 240 , // 443 - kkj-cm
- 0x6f , 0x4e4 , 0x352 , 0x2710, 0x4f35, 0x5d , 1 , 445 , 445 , // 444 - kl
- 0x46f , 0x4e4 , 0x352 , 0x2710, 0x4f35, 0x5d , 1 , 445 , 445 , // 445 - kl-gl
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 , 447 , 240 , // 446 - kln
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 , 447 , 240 , // 447 - kln-ke
- 0x53 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x28 , 2 , 449 , 143 , // 448 - km
- 0x453 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x28 , 2 , 449 , 143 , // 449 - km-kh
- 0x4b , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 451 , 143 , // 450 - kn
- 0x44b , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 451 , 143 , // 451 - kn-in
- 0x12 , 0x3b5 , 0x3b5 , 0x2713, 0x5161, 0x86 , 1 , 454 , 454 , // 452 - ko
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x83 , 1 , 453 , 240 , // 453 - ko-kp
- 0x412 , 0x3b5 , 0x3b5 , 0x2713, 0x5161, 0x86 , 1 , 454 , 454 , // 454 - ko-kr
- 0x57 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 456 , 143 , // 455 - kok
- 0x457 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 456 , 143 , // 456 - kok-in
- 0x71 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xaf , 1 , 458 , 240 , // 457 - kr
- 0x471 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xaf , 1 , 458 , 240 , // 458 - kr-ng
- 0x60 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 2 , 461 , 240 , // 459 - ks
- 0x460 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 2 , 461 , 240 , // 460 - ks-arab
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 2 , 461 , 240 , // 461 - ks-arab-in
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 463 , 187 , // 462 - ks-deva
- 0x860 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 463 , 187 , // 463 - ks-deva-in
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 , 465 , 240 , // 464 - ksb
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 , 465 , 240 , // 465 - ksb-tz
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 , 467 , 240 , // 466 - ksf
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 , 467 , 240 , // 467 - ksf-cm
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x5e , 1 , 469 , 240 , // 468 - ksh
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x5e , 1 , 469 , 240 , // 469 - ksh-de
- 0x92 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x79 , 0 , 472 , 143 , // 470 - ku
- 0x7c92 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x79 , 0 , 472 , 143 , // 471 - ku-arab
- 0x492 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x79 , 0 , 472 , 143 , // 472 - ku-arab-iq
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x74 , 0 , 473 , 240 , // 473 - ku-arab-ir
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf2 , 1 , 475 , 240 , // 474 - kw
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf2 , 1 , 475 , 240 , // 475 - kw-gb
- 0x40 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0x82 , 1 , 477 , 477 , // 476 - ky
- 0x440 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0x82 , 1 , 477 , 477 , // 477 - ky-kg
- 0x76 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0x989e, 1 , 479 , 143 , // 478 - la
- 0x476 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0x989e, 1 , 479 , 143 , // 479 - la-001
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 , 481 , 240 , // 480 - lag
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 , 481 , 240 , // 481 - lag-tz
- 0x6e , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x93 , 1 , 483 , 483 , // 482 - lb
- 0x46e , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x93 , 1 , 483 , 483 , // 483 - lb-lu
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf0 , 1 , 485 , 240 , // 484 - lg
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf0 , 1 , 485 , 240 , // 485 - lg-ug
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf4 , 1 , 487 , 240 , // 486 - lkt
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf4 , 1 , 487 , 240 , // 487 - lkt-us
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x2c , 1 , 490 , 240 , // 488 - ln
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9 , 1 , 489 , 240 , // 489 - ln-ao
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x2c , 1 , 490 , 240 , // 490 - ln-cd
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x37 , 1 , 491 , 240 , // 491 - ln-cf
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x2b , 1 , 492 , 240 , // 492 - ln-cg
- 0x54 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x8a , 1 , 494 , 143 , // 493 - lo
- 0x454 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x8a , 1 , 494 , 143 , // 494 - lo-la
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x74 , 2 , 497 , 240 , // 495 - lrc
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x79 , 2 , 496 , 240 , // 496 - lrc-iq
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x74 , 2 , 497 , 240 , // 497 - lrc-ir
- 0x27 , 0x4e9 , 0x307 , 0x272d, 0x1f4 , 0x8d , 1 , 499 , 499 , // 498 - lt
- 0x427 , 0x4e9 , 0x307 , 0x272d, 0x1f4 , 0x8d , 1 , 499 , 499 , // 499 - lt-lt
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x2c , 1 , 501 , 240 , // 500 - lu
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x2c , 1 , 501 , 240 , // 501 - lu-cd
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 , 503 , 240 , // 502 - luo
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 , 503 , 240 , // 503 - luo-ke
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 , 505 , 240 , // 504 - luy
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 , 505 , 240 , // 505 - luy-ke
- 0x26 , 0x4e9 , 0x307 , 0x272d, 0x1f4 , 0x8c , 1 , 507 , 507 , // 506 - lv
- 0x426 , 0x4e9 , 0x307 , 0x272d, 0x1f4 , 0x8c , 1 , 507 , 507 , // 507 - lv-lv
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 , 509 , 240 , // 508 - mas
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 , 509 , 240 , // 509 - mas-ke
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 , 510 , 240 , // 510 - mas-tz
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 , 512 , 240 , // 511 - mer
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 , 512 , 240 , // 512 - mer-ke
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xa0 , 1 , 514 , 240 , // 513 - mfe
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xa0 , 1 , 514 , 240 , // 514 - mfe-mu
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x95 , 1 , 516 , 240 , // 515 - mg
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x95 , 1 , 516 , 240 , // 516 - mg-mg
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xa8 , 1 , 518 , 240 , // 517 - mgh
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xa8 , 1 , 518 , 240 , // 518 - mgh-mz
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 , 520 , 240 , // 519 - mgo
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 , 520 , 240 , // 520 - mgo-cm
- 0x81 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xb7 , 1 , 522 , 522 , // 521 - mi
- 0x481 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xb7 , 1 , 522 , 522 , // 522 - mi-nz
- 0x2f , 0x4e3 , 0x362 , 0x2717, 0x1f4 , 0x4ca2, 1 , 524 , 524 , // 523 - mk
- 0x42f , 0x4e3 , 0x362 , 0x2717, 0x1f4 , 0x4ca2, 1 , 524 , 524 , // 524 - mk-mk
- 0x4c , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 526 , 143 , // 525 - ml
- 0x44c , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 526 , 143 , // 526 - ml-in
- 0x50 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0x9a , 1 , 529 , 529 , // 527 - mn
- 0x7850 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0x9a , 1 , 529 , 529 , // 528 - mn-cyrl
- 0x450 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0x9a , 1 , 529 , 529 , // 529 - mn-mn
- 0x7c50 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x2d , 1 , 531 , 531 , // 530 - mn-mong
- 0x850 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x2d , 1 , 531 , 531 , // 531 - mn-mong-cn
- 0xc50 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9a , 1 , 532 , 532 , // 532 - mn-mong-mn
- 0x58 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 534 , 187 , // 533 - mni
- 0x458 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 534 , 187 , // 534 - mni-in
- 0x7c , 0x4e4 , 0x352 , 0x2710, 0x25 , 0x27 , 1 , 536 , 240 , // 535 - moh
- 0x47c , 0x4e4 , 0x352 , 0x2710, 0x25 , 0x27 , 1 , 536 , 240 , // 536 - moh-ca
- 0x4e , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 538 , 143 , // 537 - mr
- 0x44e , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 538 , 143 , // 538 - mr-in
- 0x3e , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xa7 , 1 , 541 , 541 , // 539 - ms
- 0x83e , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x25 , 1 , 540 , 540 , // 540 - ms-bn
- 0x43e , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xa7 , 1 , 541 , 541 , // 541 - ms-my
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd7 , 1 , 542 , 240 , // 542 - ms-sg
- 0x3a , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xa3 , 1 , 544 , 544 , // 543 - mt
- 0x43a , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xa3 , 1 , 544 , 544 , // 544 - mt-mt
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 , 546 , 240 , // 545 - mua
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 , 546 , 240 , // 546 - mua-cm
- 0x55 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x1b , 2 , 548 , 240 , // 547 - my
- 0x455 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x1b , 2 , 548 , 240 , // 548 - my-mm
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x74 , 2 , 550 , 240 , // 549 - mzn
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x74 , 2 , 550 , 240 , // 550 - mzn-ir
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xfe , 1 , 552 , 240 , // 551 - naq
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xfe , 1 , 552 , 240 , // 552 - naq-na
- 0x7c14 , 0x4e4 , 0x352 , 0x2710, 0x4f35, 0xb1 , 1 , 554 , 554 , // 553 - nb
- 0x414 , 0x4e4 , 0x352 , 0x2710, 0x4f35, 0xb1 , 1 , 554 , 554 , // 554 - nb-no
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f35, 0xdc , 1 , 555 , 240 , // 555 - nb-sj
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x108 , 1 , 557 , 240 , // 556 - nd
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x108 , 1 , 557 , 240 , // 557 - nd-zw
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x5e , 1 , 559 , 240 , // 558 - nds
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x5e , 1 , 559 , 240 , // 559 - nds-de
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xb0 , 1 , 560 , 240 , // 560 - nds-nl
- 0x61 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xb2 , 1 , 563 , 143 , // 561 - ne
- 0x861 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 2 , 562 , 240 , // 562 - ne-in
- 0x461 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xb2 , 1 , 563 , 143 , // 563 - ne-np
- 0x13 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xb0 , 1 , 569 , 569 , // 564 - nl
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x12e , 1 , 565 , 240 , // 565 - nl-aw
- 0x813 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x15 , 1 , 566 , 566 , // 566 - nl-be
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x9a55d42, 1 , 567 , 240 , // 567 - nl-bq
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x111 , 1 , 568 , 240 , // 568 - nl-cw
- 0x413 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xb0 , 1 , 569 , 569 , // 569 - nl-nl
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xb5 , 1 , 570 , 240 , // 570 - nl-sr
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x78f7, 1 , 571 , 240 , // 571 - nl-sx
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 , 573 , 240 , // 572 - nmg
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 , 573 , 240 , // 573 - nmg-cm
- 0x7814 , 0x4e4 , 0x352 , 0x2710, 0x4f35, 0xb1 , 1 , 575 , 575 , // 574 - nn
- 0x814 , 0x4e4 , 0x352 , 0x2710, 0x4f35, 0xb1 , 1 , 575 , 575 , // 575 - nn-no
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 , 577 , 240 , // 576 - nnh
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 , 577 , 240 , // 577 - nnh-cm
- 0x14 , 0x4e4 , 0x352 , 0x2710, 0x4f35, 0xb1 , 1 , 554 , 554 , // 578 - no
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x64 , 2 , 580 , 143 , // 579 - nqo
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x64 , 2 , 580 , 143 , // 580 - nqo-gn
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd1 , 1 , 582 , 240 , // 581 - nr
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd1 , 1 , 582 , 240 , // 582 - nr-za
- 0x6c , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd1 , 1 , 584 , 584 , // 583 - nso
- 0x46c , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd1 , 1 , 584 , 584 , // 584 - nso-za
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x114 , 1 , 586 , 240 , // 585 - nus
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x114 , 1 , 586 , 240 , // 586 - nus-ss
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf0 , 1 , 588 , 240 , // 587 - nyn
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf0 , 1 , 588 , 240 , // 588 - nyn-ug
- 0x82 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x54 , 1 , 590 , 590 , // 589 - oc
- 0x482 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x54 , 1 , 590 , 590 , // 590 - oc-fr
- 0x72 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x49 , 1 , 592 , 240 , // 591 - om
- 0x472 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x49 , 1 , 592 , 240 , // 592 - om-et
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 , 593 , 240 , // 593 - om-ke
- 0x48 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 595 , 143 , // 594 - or
- 0x448 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 595 , 143 , // 595 - or-in
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x58 , 1 , 597 , 240 , // 596 - os
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x58 , 1 , 597 , 240 , // 597 - os-ge
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xcb , 1 , 598 , 240 , // 598 - os-ru
- 0x46 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 602 , 143 , // 599 - pa
- 0x7c46 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xbe , 2 , 601 , 143 , // 600 - pa-arab
- 0x846 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xbe , 2 , 601 , 143 , // 601 - pa-arab-pk
- 0x446 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 602 , 143 , // 602 - pa-in
- 0x79 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x993248, 1 , 604 , 145 , // 603 - pap
- 0x479 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x993248, 1 , 604 , 145 , // 604 - pap-029
- 0x15 , 0x4e2 , 0x354 , 0x272d, 0x5190, 0xbf , 1 , 606 , 606 , // 605 - pl
- 0x415 , 0x4e2 , 0x354 , 0x272d, 0x5190, 0xbf , 1 , 606 , 606 , // 606 - pl-pl
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x989e, 1 , 608 , 240 , // 607 - prg
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x989e, 1 , 608 , 240 , // 608 - prg-001
- 0x8c , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x3 , 2 , 610 , 143 , // 609 - prs
- 0x48c , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x3 , 2 , 610 , 143 , // 610 - prs-af
- 0x63 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x3 , 2 , 612 , 143 , // 611 - ps
- 0x463 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x3 , 2 , 612 , 143 , // 612 - ps-af
- 0x16 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x20 , 1 , 615 , 615 , // 613 - pt
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x9 , 1 , 614 , 240 , // 614 - pt-ao
- 0x416 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x20 , 1 , 615 , 615 , // 615 - pt-br
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xdf , 1 , 616 , 240 , // 616 - pt-ch
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x39 , 1 , 617 , 240 , // 617 - pt-cv
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x45 , 1 , 618 , 240 , // 618 - pt-gq
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xc4 , 1 , 619 , 240 , // 619 - pt-gw
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x93 , 1 , 620 , 240 , // 620 - pt-lu
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x97 , 1 , 621 , 240 , // 621 - pt-mo
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xa8 , 1 , 622 , 240 , // 622 - pt-mz
- 0x816 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xc1 , 1 , 623 , 623 , // 623 - pt-pt
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xe9 , 1 , 624 , 240 , // 624 - pt-st
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x6f60e7, 1 , 625 , 240 , // 625 - pt-tl
- 0x901 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x7c , 1 , 626 , 190 , // 626 - qps-latn-x-sh
- 0x501 , 0x4e2 , 0x354 , 0x272d, 0x5190, 0xf4 , 1 , 627 , 627 , // 627 - qps-ploc
- 0x5fe , 0x3a4 , 0x3a4 , 0x2711, 0x4f42, 0x7a , 1 , 628 , 628 , // 628 - qps-ploca
- 0x9ff , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xcd , 0 , 629 , 143 , // 629 - qps-plocm
- 0x86 , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x63 , 1 , 632 , 632 , // 630 - quc
- 0x7c86 , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x63 , 1 , 632 , 632 , // 631 - quc-latn
- 0x486 , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x63 , 1 , 632 , 632 , // 632 - quc-latn-gt
- 0x6b , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x1a , 1 , 634 , 634 , // 633 - quz
- 0x46b , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x1a , 1 , 634 , 634 , // 634 - quz-bo
- 0x86b , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x42 , 1 , 635 , 635 , // 635 - quz-ec
- 0xc6b , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xbb , 1 , 636 , 636 , // 636 - quz-pe
- 0x17 , 0x4e4 , 0x352 , 0x2710, 0x4f31, 0xdf , 1 , 638 , 638 , // 637 - rm
- 0x417 , 0x4e4 , 0x352 , 0x2710, 0x4f31, 0xdf , 1 , 638 , 638 , // 638 - rm-ch
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x26 , 1 , 640 , 240 , // 639 - rn
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x26 , 1 , 640 , 240 , // 640 - rn-bi
- 0x18 , 0x4e2 , 0x354 , 0x272d, 0x5190, 0xc8 , 1 , 643 , 643 , // 641 - ro
- 0x818 , 0x4e2 , 0x354 , 0x2 , 0x1f4 , 0x98 , 1 , 642 , 240 , // 642 - ro-md
- 0x418 , 0x4e2 , 0x354 , 0x272d, 0x5190, 0xc8 , 1 , 643 , 643 , // 643 - ro-ro
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 , 645 , 240 , // 644 - rof
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 , 645 , 240 , // 645 - rof-tz
- 0x19 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0xcb , 1 , 651 , 651 , // 646 - ru
- 0x1000 , 0x4e3 , 0x362 , 0x2 , 0x1f4 , 0x1d , 1 , 647 , 240 , // 647 - ru-by
- 0x1000 , 0x4e3 , 0x362 , 0x2 , 0x1f4 , 0x82 , 1 , 648 , 240 , // 648 - ru-kg
- 0x1000 , 0x4e3 , 0x362 , 0x2 , 0x1f4 , 0x89 , 1 , 649 , 240 , // 649 - ru-kz
- 0x819 , 0x4e3 , 0x362 , 0x2 , 0x1f4 , 0x98 , 1 , 650 , 240 , // 650 - ru-md
- 0x419 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0xcb , 1 , 651 , 651 , // 651 - ru-ru
- 0x1000 , 0x4e3 , 0x362 , 0x2 , 0x1f4 , 0xf1 , 1 , 652 , 240 , // 652 - ru-ua
- 0x87 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xcc , 1 , 654 , 654 , // 653 - rw
- 0x487 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xcc , 1 , 654 , 654 , // 654 - rw-rw
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 , 656 , 240 , // 655 - rwk
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 , 656 , 240 , // 656 - rwk-tz
- 0x4f , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 658 , 143 , // 657 - sa
- 0x44f , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 658 , 143 , // 658 - sa-in
- 0x85 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0xcb , 1 , 660 , 660 , // 659 - sah
- 0x485 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0xcb , 1 , 660 , 660 , // 660 - sah-ru
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 , 662 , 240 , // 661 - saq
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 , 662 , 240 , // 662 - saq-ke
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 , 664 , 240 , // 663 - sbp
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 , 664 , 240 , // 664 - sbp-tz
- 0x59 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xbe , 2 , 667 , 143 , // 665 - sd
- 0x7c59 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xbe , 2 , 667 , 143 , // 666 - sd-arab
- 0x859 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xbe , 2 , 667 , 143 , // 667 - sd-arab-pk
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 669 , 187 , // 668 - sd-deva
- 0x459 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 669 , 187 , // 669 - sd-deva-in
- 0x3b , 0x4e4 , 0x352 , 0x2710, 0x4f35, 0xb1 , 1 , 672 , 672 , // 670 - se
- 0xc3b , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0x4d , 1 , 671 , 671 , // 671 - se-fi
- 0x43b , 0x4e4 , 0x352 , 0x2710, 0x4f35, 0xb1 , 1 , 672 , 672 , // 672 - se-no
- 0x83b , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0xdd , 1 , 673 , 673 , // 673 - se-se
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xa8 , 1 , 675 , 240 , // 674 - seh
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xa8 , 1 , 675 , 240 , // 675 - seh-mz
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9d , 1 , 677 , 240 , // 676 - ses
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9d , 1 , 677 , 240 , // 677 - ses-ml
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x37 , 1 , 679 , 240 , // 678 - sg
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x37 , 1 , 679 , 240 , // 679 - sg-cf
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9f , 1 , 684 , 240 , // 680 - shi
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9f , 1 , 682 , 240 , // 681 - shi-latn
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9f , 1 , 682 , 240 , // 682 - shi-latn-ma
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9f , 1 , 684 , 240 , // 683 - shi-tfng
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9f , 1 , 684 , 240 , // 684 - shi-tfng-ma
- 0x5b , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x2a , 1 , 686 , 143 , // 685 - si
- 0x45b , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x2a , 1 , 686 , 143 , // 686 - si-lk
- 0x1b , 0x4e2 , 0x354 , 0x272d, 0x5190, 0x8f , 1 , 688 , 688 , // 687 - sk
- 0x41b , 0x4e2 , 0x354 , 0x272d, 0x5190, 0x8f , 1 , 688 , 688 , // 688 - sk-sk
- 0x24 , 0x4e2 , 0x354 , 0x272d, 0x5190, 0xd4 , 1 , 690 , 690 , // 689 - sl
- 0x424 , 0x4e2 , 0x354 , 0x272d, 0x5190, 0xd4 , 1 , 690 , 690 , // 690 - sl-si
- 0x783b , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0xdd , 1 , 693 , 693 , // 691 - sma
- 0x183b , 0x4e4 , 0x352 , 0x2710, 0x4f35, 0xb1 , 1 , 692 , 692 , // 692 - sma-no
- 0x1c3b , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0xdd , 1 , 693 , 693 , // 693 - sma-se
- 0x7c3b , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0xdd , 1 , 696 , 696 , // 694 - smj
- 0x103b , 0x4e4 , 0x352 , 0x2710, 0x4f35, 0xb1 , 1 , 695 , 695 , // 695 - smj-no
- 0x143b , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0xdd , 1 , 696 , 696 , // 696 - smj-se
- 0x703b , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0x4d , 1 , 698 , 698 , // 697 - smn
- 0x243b , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0x4d , 1 , 698 , 698 , // 698 - smn-fi
- 0x743b , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0x4d , 1 , 700 , 700 , // 699 - sms
- 0x203b , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0x4d , 1 , 700 , 700 , // 700 - sms-fi
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x108 , 1 , 703 , 240 , // 701 - sn
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x108 , 1 , 703 , 240 , // 702 - sn-latn
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x108 , 1 , 703 , 240 , // 703 - sn-latn-zw
- 0x77 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd8 , 1 , 708 , 240 , // 704 - so
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x3e , 1 , 705 , 240 , // 705 - so-dj
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x49 , 1 , 706 , 240 , // 706 - so-et
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 , 707 , 240 , // 707 - so-ke
- 0x477 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd8 , 1 , 708 , 240 , // 708 - so-so
- 0x1c , 0x4e2 , 0x354 , 0x272d, 0x5190, 0x6 , 1 , 710 , 710 , // 709 - sq
- 0x41c , 0x4e2 , 0x354 , 0x272d, 0x5190, 0x6 , 1 , 710 , 710 , // 710 - sq-al
- 0x1000 , 0x4e2 , 0x354 , 0x272d, 0x5190, 0x4ca2, 1 , 711 , 240 , // 711 - sq-mk
- 0x1000 , 0x4e2 , 0x354 , 0x272d, 0x5190, 0x974941, 1 , 712 , 240 , // 712 - sq-xk
- 0x7c1a , 0x4e2 , 0x354 , 0x272d, 0x1f4 , 0x10f , 1 , 724 , 724 , // 713 - sr
- 0x6c1a , 0x4e3 , 0x357 , 0x2717, 0x5221, 0x10f , 1 , 718 , 718 , // 714 - sr-cyrl
- 0x1c1a , 0x4e3 , 0x357 , 0x2717, 0x5221, 0x19 , 1 , 715 , 715 , // 715 - sr-cyrl-ba
- 0xc1a , 0x4e3 , 0x357 , 0x2717, 0x5221, 0x10d , 1 , 716 , 716 , // 716 - sr-cyrl-cs
- 0x301a , 0x4e3 , 0x357 , 0x2717, 0x5221, 0x10e , 1 , 717 , 717 , // 717 - sr-cyrl-me
- 0x281a , 0x4e3 , 0x357 , 0x2717, 0x5221, 0x10f , 1 , 718 , 718 , // 718 - sr-cyrl-rs
- 0x1000 , 0x4e3 , 0x357 , 0x2717, 0x5221, 0x974941, 1 , 719 , 240 , // 719 - sr-cyrl-xk
- 0x701a , 0x4e2 , 0x354 , 0x272d, 0x1f4 , 0x10f , 1 , 724 , 724 , // 720 - sr-latn
- 0x181a , 0x4e2 , 0x354 , 0x2762, 0x366 , 0x19 , 1 , 721 , 721 , // 721 - sr-latn-ba
- 0x81a , 0x4e2 , 0x354 , 0x272d, 0x1f4 , 0x10d , 1 , 722 , 722 , // 722 - sr-latn-cs
- 0x2c1a , 0x4e2 , 0x354 , 0x272d, 0x1f4 , 0x10e , 1 , 723 , 723 , // 723 - sr-latn-me
- 0x241a , 0x4e2 , 0x354 , 0x272d, 0x1f4 , 0x10f , 1 , 724 , 724 , // 724 - sr-latn-rs
- 0x1000 , 0x4e2 , 0x354 , 0x272d, 0x1f4 , 0x974941, 1 , 725 , 240 , // 725 - sr-latn-xk
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd1 , 1 , 728 , 240 , // 726 - ss
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x104 , 1 , 727 , 240 , // 727 - ss-sz
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd1 , 1 , 728 , 240 , // 728 - ss-za
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x47 , 1 , 730 , 240 , // 729 - ssy
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x47 , 1 , 730 , 240 , // 730 - ssy-er
- 0x30 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd1 , 1 , 733 , 240 , // 731 - st
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x92 , 1 , 732 , 240 , // 732 - st-ls
- 0x430 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd1 , 1 , 733 , 240 , // 733 - st-za
- 0x1d , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0xdd , 1 , 737 , 737 , // 734 - sv
- 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0x9906f5, 1 , 735 , 240 , // 735 - sv-ax
- 0x81d , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0x4d , 1 , 736 , 736 , // 736 - sv-fi
- 0x41d , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0xdd , 1 , 737 , 737 , // 737 - sv-se
- 0x41 , 0x4e4 , 0x1b5 , 0x2710, 0x1f4 , 0x81 , 1 , 740 , 740 , // 738 - sw
- 0x1000 , 0x4e4 , 0x1b5 , 0x2710, 0x1f4 , 0x2c , 1 , 739 , 740 , // 739 - sw-cd
- 0x441 , 0x4e4 , 0x1b5 , 0x2710, 0x1f4 , 0x81 , 1 , 740 , 740 , // 740 - sw-ke
- 0x1000 , 0x4e4 , 0x1b5 , 0x2710, 0x1f4 , 0xef , 1 , 741 , 240 , // 741 - sw-tz
- 0x1000 , 0x4e4 , 0x1b5 , 0x2710, 0x1f4 , 0xf0 , 1 , 742 , 240 , // 742 - sw-ug
- 0x1000 , 0x0 , 0x1 , 0x0 , 0x1f4 , 0x2c , 1 , 744 , 240 , // 743 - swc
- 0x1000 , 0x0 , 0x1 , 0x0 , 0x1f4 , 0x2c , 1 , 744 , 240 , // 744 - swc-cd
- 0x5a , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xde , 1 , 746 , 143 , // 745 - syr
- 0x45a , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xde , 1 , 746 , 143 , // 746 - syr-sy
- 0x49 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 748 , 143 , // 747 - ta
- 0x449 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 748 , 143 , // 748 - ta-in
- 0x849 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x2a , 1 , 749 , 143 , // 749 - ta-lk
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xa7 , 1 , 750 , 240 , // 750 - ta-my
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd7 , 1 , 751 , 240 , // 751 - ta-sg
- 0x4a , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 753 , 143 , // 752 - te
- 0x44a , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 , 753 , 143 , // 753 - te-in
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf0 , 1 , 756 , 240 , // 754 - teo
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 , 755 , 240 , // 755 - teo-ke
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf0 , 1 , 756 , 240 , // 756 - teo-ug
- 0x28 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0xe4 , 1 , 759 , 759 , // 757 - tg
- 0x7c28 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0xe4 , 1 , 759 , 759 , // 758 - tg-cyrl
- 0x428 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0xe4 , 1 , 759 , 759 , // 759 - tg-cyrl-tj
- 0x1e , 0x36a , 0x36a , 0x2725, 0x5166, 0xe3 , 1 , 761 , 143 , // 760 - th
- 0x41e , 0x36a , 0x36a , 0x2725, 0x5166, 0xe3 , 1 , 761 , 143 , // 761 - th-th
- 0x73 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x47 , 1 , 763 , 143 , // 762 - ti
- 0x873 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x47 , 1 , 763 , 143 , // 763 - ti-er
- 0x473 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x49 , 1 , 764 , 143 , // 764 - ti-et
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x47 , 1 , 766 , 240 , // 765 - tig
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x47 , 1 , 766 , 240 , // 766 - tig-er
- 0x42 , 0x4e2 , 0x354 , 0x272d, 0x5190, 0xee , 1 , 768 , 768 , // 767 - tk
- 0x442 , 0x4e2 , 0x354 , 0x272d, 0x5190, 0xee , 1 , 768 , 768 , // 768 - tk-tm
- 0x32 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd1 , 1 , 771 , 771 , // 769 - tn
- 0x832 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x13 , 1 , 770 , 770 , // 770 - tn-bw
- 0x432 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd1 , 1 , 771 , 771 , // 771 - tn-za
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xe7 , 1 , 773 , 240 , // 772 - to
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xe7 , 1 , 773 , 240 , // 773 - to-to
- 0x1f , 0x4e6 , 0x359 , 0x2761, 0x51a9, 0xeb , 1 , 776 , 776 , // 774 - tr
- 0x1000 , 0x4e6 , 0x359 , 0x2761, 0x51a9, 0x3b , 1 , 775 , 240 , // 775 - tr-cy
- 0x41f , 0x4e6 , 0x359 , 0x2761, 0x51a9, 0xeb , 1 , 776 , 776 , // 776 - tr-tr
- 0x31 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd1 , 1 , 778 , 240 , // 777 - ts
- 0x431 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd1 , 1 , 778 , 240 , // 778 - ts-za
- 0x44 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0xcb , 1 , 780 , 780 , // 779 - tt
- 0x444 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0xcb , 1 , 780 , 780 , // 780 - tt-ru
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xad , 1 , 782 , 240 , // 781 - twq
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xad , 1 , 782 , 240 , // 782 - twq-ne
- 0x5f , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x4 , 1 , 787 , 787 , // 783 - tzm
- 0x1000 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x9f , 1 , 785 , 240 , // 784 - tzm-arab
- 0x45f , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x9f , 1 , 785 , 240 , // 785 - tzm-arab-ma
- 0x7c5f , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x4 , 1 , 787 , 787 , // 786 - tzm-latn
- 0x85f , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x4 , 1 , 787 , 787 , // 787 - tzm-latn-dz
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9f , 1 , 788 , 240 , // 788 - tzm-latn-ma
- 0x785f , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9f , 1 , 790 , 316 , // 789 - tzm-tfng
- 0x105f , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9f , 1 , 790 , 316 , // 790 - tzm-tfng-ma
- 0x80 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x2d , 1 , 792 , 143 , // 791 - ug
- 0x480 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x2d , 1 , 792 , 143 , // 792 - ug-cn
- 0x22 , 0x4e3 , 0x362 , 0x2721, 0x1f4 , 0xf1 , 1 , 794 , 794 , // 793 - uk
- 0x422 , 0x4e3 , 0x362 , 0x2721, 0x1f4 , 0xf1 , 1 , 794 , 794 , // 794 - uk-ua
- 0x20 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xbe , 1 , 797 , 143 , // 795 - ur
- 0x820 , 0x4e8 , 0x2d0 , 0x2 , 0x1f4 , 0x71 , 2 , 796 , 240 , // 796 - ur-in
- 0x420 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xbe , 1 , 797 , 143 , // 797 - ur-pk
- 0x43 , 0x4e6 , 0x359 , 0x272d, 0x1f4 , 0xf7 , 1 , 804 , 804 , // 798 - uz
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x3 , 2 , 800 , 240 , // 799 - uz-arab
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x3 , 2 , 800 , 240 , // 800 - uz-arab-af
- 0x7843 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0xf7 , 1 , 802 , 802 , // 801 - uz-cyrl
- 0x843 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0xf7 , 1 , 802 , 802 , // 802 - uz-cyrl-uz
- 0x7c43 , 0x4e6 , 0x359 , 0x272d, 0x1f4 , 0xf7 , 1 , 804 , 804 , // 803 - uz-latn
- 0x443 , 0x4e6 , 0x359 , 0x272d, 0x1f4 , 0xf7 , 1 , 804 , 804 , // 804 - uz-latn-uz
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x8e , 1 , 809 , 240 , // 805 - vai
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x8e , 1 , 807 , 240 , // 806 - vai-latn
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x8e , 1 , 807 , 240 , // 807 - vai-latn-lr
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x8e , 1 , 809 , 240 , // 808 - vai-vaii
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x8e , 1 , 809 , 240 , // 809 - vai-vaii-lr
- 0x33 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd1 , 1 , 811 , 240 , // 810 - ve
- 0x433 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd1 , 1 , 811 , 240 , // 811 - ve-za
- 0x2a , 0x4ea , 0x4ea , 0x2710, 0x1f4 , 0xfb , 1 , 813 , 143 , // 812 - vi
- 0x42a , 0x4ea , 0x4ea , 0x2710, 0x1f4 , 0xfb , 1 , 813 , 143 , // 813 - vi-vn
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x989e, 1 , 815 , 240 , // 814 - vo
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x989e, 1 , 815 , 240 , // 815 - vo-001
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 , 817 , 240 , // 816 - vun
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 , 817 , 240 , // 817 - vun-tz
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xdf , 1 , 819 , 240 , // 818 - wae
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xdf , 1 , 819 , 240 , // 819 - wae-ch
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x49 , 1 , 821 , 240 , // 820 - wal
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x49 , 1 , 821 , 240 , // 821 - wal-et
- 0x88 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xd2 , 1 , 823 , 823 , // 822 - wo
- 0x488 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xd2 , 1 , 823 , 823 , // 823 - wo-sn
- 0x1007f, 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xf4 , 1 , -1 , -1 , // 824 - x-iv_mathan
- 0x34 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd1 , 1 , 826 , 826 , // 825 - xh
- 0x434 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd1 , 1 , 826 , 826 , // 826 - xh-za
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf0 , 1 , 828 , 240 , // 827 - xog
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf0 , 1 , 828 , 240 , // 828 - xog-ug
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 , 830 , 240 , // 829 - yav
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 , 830 , 240 , // 830 - yav-cm
- 0x3d , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x989e, 1 , 832 , 240 , // 831 - yi
- 0x43d , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x989e, 1 , 832 , 240 , // 832 - yi-001
- 0x6a , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xaf , 1 , 835 , 835 , // 833 - yo
- 0x1000 , 0x4e4 , 0x1b5 , 0x2710, 0x1f4 , 0x1c , 1 , 834 , 240 , // 834 - yo-bj
- 0x46a , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xaf , 1 , 835 , 835 , // 835 - yo-ng
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x68 , 1 , 837 , 240 , // 836 - yue
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x68 , 1 , 837 , 240 , // 837 - yue-hk
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9f , 1 , 840 , 316 , // 838 - zgh
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9f , 1 , 840 , 316 , // 839 - zgh-tfng
- 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9f , 1 , 840 , 316 , // 840 - zgh-tfng-ma
- 0x7804 , 0x3a8 , 0x3a8 , 0x2718, 0x1f4 , 0x2d , 1 , 844 , 844 , // 841 - zh
- 0x4 , 0x3a8 , 0x3a8 , 0x0 , 0x1f4 , 0x2d , 1 , 844 , 844 , // 842 - zh-chs
- 0x7c04 , 0x3b6 , 0x3b6 , 0x0 , 0x1f4 , 0x68 , 1 , 851 , 851 , // 843 - zh-cht
- 0x804 , 0x3a8 , 0x3a8 , 0x2718, 0x1f4 , 0x2d , 1 , 844 , 844 , // 844 - zh-cn
- 0x50804, 0x3a8 , 0x3a8 , 0x2718, 0x1f4 , 0x2d , 1 , 844 , 844 , // 845 - zh-cn_phoneb
- 0x20804, 0x3a8 , 0x3a8 , 0x2718, 0x1f4 , 0x2d , 1 , 844 , 844 , // 846 - zh-cn_stroke
- 0x4 , 0x3a8 , 0x3a8 , 0x2718, 0x1f4 , 0x2d , 1 , 844 , 844 , // 847 - zh-hans
- 0x1000 , 0x3a8 , 0x3a8 , 0x2718, 0x1f4 , 0x68 , 1 , 848 , 240 , // 848 - zh-hans-hk
- 0x1000 , 0x3a8 , 0x3a8 , 0x2718, 0x1f4 , 0x97 , 1 , 849 , 240 , // 849 - zh-hans-mo
- 0x7c04 , 0x3b6 , 0x3b6 , 0x2712, 0x1f4 , 0x68 , 1 , 851 , 851 , // 850 - zh-hant
- 0xc04 , 0x3b6 , 0x3b6 , 0x2712, 0x1f4 , 0x68 , 1 , 851 , 851 , // 851 - zh-hk
- 0x40c04, 0x3b6 , 0x3b6 , 0x2712, 0x1f4 , 0x68 , 1 , 851 , 851 , // 852 - zh-hk_radstr
- 0x1404 , 0x3b6 , 0x3b6 , 0x2712, 0x1f4 , 0x97 , 1 , 853 , 853 , // 853 - zh-mo
- 0x41404, 0x3b6 , 0x3b6 , 0x2712, 0x1f4 , 0x97 , 1 , 853 , 853 , // 854 - zh-mo_radstr
- 0x21404, 0x3b6 , 0x3b6 , 0x2712, 0x1f4 , 0x97 , 1 , 853 , 853 , // 855 - zh-mo_stroke
- 0x1004 , 0x3a8 , 0x3a8 , 0x2718, 0x1f4 , 0xd7 , 1 , 856 , 856 , // 856 - zh-sg
- 0x51004, 0x3a8 , 0x3a8 , 0x2718, 0x1f4 , 0xd7 , 1 , 856 , 856 , // 857 - zh-sg_phoneb
- 0x21004, 0x3a8 , 0x3a8 , 0x2718, 0x1f4 , 0xd7 , 1 , 856 , 856 , // 858 - zh-sg_stroke
- 0x404 , 0x3b6 , 0x3b6 , 0x2712, 0x1f4 , 0xed , 1 , 859 , 859 , // 859 - zh-tw
- 0x30404, 0x3b6 , 0x3b6 , 0x2712, 0x1f4 , 0xed , 1 , 859 , 859 , // 860 - zh-tw_pronun
- 0x40404, 0x3b6 , 0x3b6 , 0x2712, 0x1f4 , 0xed , 1 , 859 , 859 , // 861 - zh-tw_radstr
- 0x35 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd1 , 1 , 863 , 863 , // 862 - zu
- 0x435 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd1 , 1 , 863 , 863 , // 863 - zu-za
+ // Lcid, Ansi CP, Oem CP, MAC CP, EBCDIC CP, Geo Id, digit substitution | ListSeparator, Specific culture index, Console locale index // index - locale name
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x49 , 1 | SemicolonSep , 3 , 240 , // 0 - aa
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x3e , 1 | SemicolonSep , 1 , 240 , // 1 - aa-dj
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x47 , 1 | SemicolonSep , 2 , 240 , // 2 - aa-er
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x49 , 1 | SemicolonSep , 3 , 240 , // 3 - aa-et
+ 0x36 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd1 , 1 | SemicolonSep , 6 , 6 , // 4 - af
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xfe , 1 | SemicolonSep , 5 , 240 , // 5 - af-na
+ 0x436 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd1 , 1 | SemicolonSep , 6 , 6 , // 6 - af-za
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 | SemicolonSep , 8 , 240 , // 7 - agq
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 | SemicolonSep , 8 , 240 , // 8 - agq-cm
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x59 , 1 | SemicolonSep , 10 , 240 , // 9 - ak
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x59 , 1 | SemicolonSep , 10 , 240 , // 10 - ak-gh
+ 0x5e , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x49 , 1 | SemicolonSep , 12 , 143 , // 11 - am
+ 0x45e , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x49 , 1 | SemicolonSep , 12 , 143 , // 12 - am-et
+ 0x1 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xcd , 0 | SemicolonSep , 33 , 143 , // 13 - ar
+ 0x1000 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x989e, 0 | SemicolonSep , 14 , 240 , // 14 - ar-001
+ 0x3801 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xe0 , 0 | SemicolonSep , 15 , 143 , // 15 - ar-ae
+ 0x3c01 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x11 , 0 | SemicolonSep , 16 , 143 , // 16 - ar-bh
+ 0x1000 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x3e , 0 | SemicolonSep , 17 , 240 , // 17 - ar-dj
+ 0x1401 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x4 , 1 | SemicolonSep , 18 , 300 , // 18 - ar-dz
+ 0xc01 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x43 , 0 | SemicolonSep , 19 , 143 , // 19 - ar-eg
+ 0x1000 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x47 , 0 | SemicolonSep , 20 , 240 , // 20 - ar-er
+ 0x1000 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x75 , 0 | SemicolonSep , 21 , 240 , // 21 - ar-il
+ 0x801 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x79 , 0 | SemicolonSep , 22 , 143 , // 22 - ar-iq
+ 0x2c01 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x7e , 0 | SemicolonSep , 23 , 143 , // 23 - ar-jo
+ 0x1000 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x32 , 0 | SemicolonSep , 24 , 240 , // 24 - ar-km
+ 0x3401 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x88 , 0 | SemicolonSep , 25 , 143 , // 25 - ar-kw
+ 0x3001 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x8b , 0 | SemicolonSep , 26 , 143 , // 26 - ar-lb
+ 0x1001 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x94 , 1 | SemicolonSep , 27 , 143 , // 27 - ar-ly
+ 0x1801 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x9f , 1 | SemicolonSep , 28 , 300 , // 28 - ar-ma
+ 0x1000 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xa2 , 0 | SemicolonSep , 29 , 240 , // 29 - ar-mr
+ 0x2001 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xa4 , 0 | SemicolonSep , 30 , 143 , // 30 - ar-om
+ 0x1000 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xb8 , 0 | SemicolonSep , 31 , 240 , // 31 - ar-ps
+ 0x4001 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xc5 , 0 | SemicolonSep , 32 , 143 , // 32 - ar-qa
+ 0x401 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xcd , 0 | SemicolonSep , 33 , 143 , // 33 - ar-sa
+ 0x1000 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xdb , 0 | SemicolonSep , 34 , 240 , // 34 - ar-sd
+ 0x1000 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xd8 , 0 | SemicolonSep , 35 , 240 , // 35 - ar-so
+ 0x1000 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x114 , 0 | SemicolonSep , 36 , 240 , // 36 - ar-ss
+ 0x2801 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xde , 0 | SemicolonSep , 37 , 143 , // 37 - ar-sy
+ 0x1000 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x29 , 0 | SemicolonSep , 38 , 240 , // 38 - ar-td
+ 0x1c01 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xea , 1 | SemicolonSep , 39 , 300 , // 39 - ar-tn
+ 0x2401 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x105 , 0 | SemicolonSep , 40 , 143 , // 40 - ar-ye
+ 0x7a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x2e , 1 | CommaSep , 42 , 42 , // 41 - arn
+ 0x47a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x2e , 1 | CommaSep , 42 , 42 , // 42 - arn-cl
+ 0x4d , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | CommaSep , 44 , 143 , // 43 - as
+ 0x44d , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | CommaSep , 44 , 143 , // 44 - as-in
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 | SemicolonSep , 46 , 240 , // 45 - asa
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 | SemicolonSep , 46 , 240 , // 46 - asa-tz
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd9 , 1 | SemicolonSep , 48 , 240 , // 47 - ast
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd9 , 1 | SemicolonSep , 48 , 240 , // 48 - ast-es
+ 0x2c , 0x4e6 , 0x359 , 0x2761, 0x51a9, 0x5 , 1 | SemicolonSep , 53 , 53 , // 49 - az
+ 0x742c , 0x4e3 , 0x362 , 0x2717, 0x5190, 0x5 , 1 | SemicolonSep , 51 , 51 , // 50 - az-cyrl
+ 0x82c , 0x4e3 , 0x362 , 0x2717, 0x5190, 0x5 , 1 | SemicolonSep , 51 , 51 , // 51 - az-cyrl-az
+ 0x782c , 0x4e6 , 0x359 , 0x2761, 0x51a9, 0x5 , 1 | SemicolonSep , 53 , 53 , // 52 - az-latn
+ 0x42c , 0x4e6 , 0x359 , 0x2761, 0x51a9, 0x5 , 1 | SemicolonSep , 53 , 53 , // 53 - az-latn-az
+ 0x6d , 0x4e3 , 0x362 , 0x2717, 0x5190, 0xcb , 1 | SemicolonSep , 55 , 55 , // 54 - ba
+ 0x46d , 0x4e3 , 0x362 , 0x2717, 0x5190, 0xcb , 1 | SemicolonSep , 55 , 55 , // 55 - ba-ru
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 | SemicolonSep , 57 , 240 , // 56 - bas
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 | SemicolonSep , 57 , 240 , // 57 - bas-cm
+ 0x23 , 0x4e3 , 0x362 , 0x2717, 0x1f4 , 0x1d , 1 | SemicolonSep , 59 , 59 , // 58 - be
+ 0x423 , 0x4e3 , 0x362 , 0x2717, 0x1f4 , 0x1d , 1 | SemicolonSep , 59 , 59 , // 59 - be-by
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x107 , 1 | SemicolonSep , 61 , 240 , // 60 - bem
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x107 , 1 | SemicolonSep , 61 , 240 , // 61 - bem-zm
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 | SemicolonSep , 63 , 240 , // 62 - bez
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 | SemicolonSep , 63 , 240 , // 63 - bez-tz
+ 0x2 , 0x4e3 , 0x362 , 0x2717, 0x5221, 0x23 , 1 | SemicolonSep , 65 , 65 , // 64 - bg
+ 0x402 , 0x4e3 , 0x362 , 0x2717, 0x5221, 0x23 , 1 | SemicolonSep , 65 , 65 , // 65 - bg-bg
+ 0x66 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xaf , 1 | SemicolonSep , 67 , 240 , // 66 - bin
+ 0x466 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xaf , 1 | SemicolonSep , 67 , 240 , // 67 - bin-ng
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9d , 1 | SemicolonSep , 70 , 240 , // 68 - bm
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9d , 1 | SemicolonSep , 70 , 240 , // 69 - bm-latn
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9d , 1 | SemicolonSep , 70 , 240 , // 70 - bm-latn-ml
+ 0x45 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x17 , 1 | CommaSep , 72 , 143 , // 71 - bn
+ 0x845 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x17 , 1 | CommaSep , 72 , 143 , // 72 - bn-bd
+ 0x445 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | CommaSep , 73 , 143 , // 73 - bn-in
+ 0x51 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x2d , 1 | CommaSep , 75 , 143 , // 74 - bo
+ 0x451 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x2d , 1 | CommaSep , 75 , 143 , // 75 - bo-cn
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | SemicolonSep , 76 , 240 , // 76 - bo-in
+ 0x7e , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x54 , 1 | SemicolonSep , 78 , 78 , // 77 - br
+ 0x47e , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x54 , 1 | SemicolonSep , 78 , 78 , // 78 - br-fr
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | SemicolonSep , 80 , 240 , // 79 - brx
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | SemicolonSep , 80 , 240 , // 80 - brx-in
+ 0x781a , 0x4e2 , 0x354 , 0x2762, 0x366 , 0x19 , 1 | SemicolonSep , 85 , 85 , // 81 - bs
+ 0x641a , 0x4e3 , 0x357 , 0x2762, 0x366 , 0x19 , 1 | SemicolonSep , 83 , 83 , // 82 - bs-cyrl
+ 0x201a , 0x4e3 , 0x357 , 0x2762, 0x366 , 0x19 , 1 | SemicolonSep , 83 , 83 , // 83 - bs-cyrl-ba
+ 0x681a , 0x4e2 , 0x354 , 0x2762, 0x366 , 0x19 , 1 | SemicolonSep , 85 , 85 , // 84 - bs-latn
+ 0x141a , 0x4e2 , 0x354 , 0x2762, 0x366 , 0x19 , 1 | SemicolonSep , 85 , 85 , // 85 - bs-latn-ba
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x47 , 1 | SemicolonSep , 87 , 240 , // 86 - byn
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x47 , 1 | SemicolonSep , 87 , 240 , // 87 - byn-er
+ 0x3 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd9 , 1 | SemicolonSep , 90 , 90 , // 88 - ca
+ 0x1000 , 0x4e4 , 0x352 , 0x2 , 0x1f4 , 0x8 , 1 | SemicolonSep , 89 , 240 , // 89 - ca-ad
+ 0x403 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd9 , 1 | SemicolonSep , 90 , 90 , // 90 - ca-es
+ 0x803 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd9 , 1 | SemicolonSep , 91 , 90 , // 91 - ca-es-valencia
+ 0x1000 , 0x4e4 , 0x352 , 0x2 , 0x1f4 , 0x54 , 1 | SemicolonSep , 92 , 240 , // 92 - ca-fr
+ 0x1000 , 0x4e4 , 0x352 , 0x2 , 0x1f4 , 0x76 , 1 | SemicolonSep , 93 , 240 , // 93 - ca-it
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xcb , 1 | SemicolonSep , 95 , 240 , // 94 - ce
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xcb , 1 | SemicolonSep , 95 , 240 , // 95 - ce-ru
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf0 , 1 | SemicolonSep , 97 , 240 , // 96 - cgg
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf0 , 1 | SemicolonSep , 97 , 240 , // 97 - cgg-ug
+ 0x5c , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf4 , 1 | CommaSep , 100 , 240 , // 98 - chr
+ 0x7c5c , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf4 , 1 | CommaSep , 100 , 240 , // 99 - chr-cher
+ 0x45c , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf4 , 1 | CommaSep , 100 , 240 , // 100 - chr-cher-us
+ 0x83 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x54 , 1 | SemicolonSep , 102 , 102 , // 101 - co
+ 0x483 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x54 , 1 | SemicolonSep , 102 , 102 , // 102 - co-fr
+ 0x5 , 0x4e2 , 0x354 , 0x272d, 0x1f4 , 0x4b , 1 | SemicolonSep , 104 , 104 , // 103 - cs
+ 0x405 , 0x4e2 , 0x354 , 0x272d, 0x1f4 , 0x4b , 1 | SemicolonSep , 104 , 104 , // 104 - cs-cz
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xcb , 1 | SemicolonSep , 106 , 240 , // 105 - cu
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xcb , 1 | SemicolonSep , 106 , 240 , // 106 - cu-ru
+ 0x52 , 0x4e4 , 0x352 , 0x2710, 0x4f3d, 0xf2 , 1 | SemicolonSep , 108 , 108 , // 107 - cy
+ 0x452 , 0x4e4 , 0x352 , 0x2710, 0x4f3d, 0xf2 , 1 | SemicolonSep , 108 , 108 , // 108 - cy-gb
+ 0x6 , 0x4e4 , 0x352 , 0x2710, 0x4f35, 0x3d , 1 | SemicolonSep , 110 , 110 , // 109 - da
+ 0x406 , 0x4e4 , 0x352 , 0x2710, 0x4f35, 0x3d , 1 | SemicolonSep , 110 , 110 , // 110 - da-dk
+ 0x1000 , 0x4e4 , 0x352 , 0x2 , 0x1f4 , 0x5d , 1 | SemicolonSep , 111 , 240 , // 111 - da-gl
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 | SemicolonSep , 113 , 240 , // 112 - dav
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 | SemicolonSep , 113 , 240 , // 113 - dav-ke
+ 0x7 , 0x4e4 , 0x352 , 0x2710, 0x4f31, 0x5e , 1 | SemicolonSep , 118 , 118 , // 114 - de
+ 0xc07 , 0x4e4 , 0x352 , 0x2710, 0x4f31, 0xe , 1 | SemicolonSep , 115 , 115 , // 115 - de-at
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f31, 0x15 , 1 | SemicolonSep , 116 , 240 , // 116 - de-be
+ 0x807 , 0x4e4 , 0x352 , 0x2710, 0x4f31, 0xdf , 1 | SemicolonSep , 117 , 117 , // 117 - de-ch
+ 0x407 , 0x4e4 , 0x352 , 0x2710, 0x4f31, 0x5e , 1 | SemicolonSep , 118 , 118 , // 118 - de-de
+ 0x10407, 0x4e4 , 0x352 , 0x2710, 0x4f31, 0x5e , 1 | SemicolonSep , 118 , 118 , // 119 - de-de_phoneb
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x76 , 1 | SemicolonSep , 120 , 240 , // 120 - de-it
+ 0x1407 , 0x4e4 , 0x352 , 0x2710, 0x4f31, 0x91 , 1 | SemicolonSep , 121 , 121 , // 121 - de-li
+ 0x1007 , 0x4e4 , 0x352 , 0x2710, 0x4f31, 0x93 , 1 | SemicolonSep , 122 , 122 , // 122 - de-lu
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xad , 1 | SemicolonSep , 124 , 240 , // 123 - dje
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xad , 1 | SemicolonSep , 124 , 240 , // 124 - dje-ne
+ 0x7c2e , 0x4e4 , 0x352 , 0x2710, 0x366 , 0x5e , 1 | SemicolonSep , 126 , 126 , // 125 - dsb
+ 0x82e , 0x4e4 , 0x352 , 0x2710, 0x366 , 0x5e , 1 | SemicolonSep , 126 , 126 , // 126 - dsb-de
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 | SemicolonSep , 128 , 240 , // 127 - dua
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 | SemicolonSep , 128 , 240 , // 128 - dua-cm
+ 0x65 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xa5 , 1 | ArabicCommaSep , 130 , 143 , // 129 - dv
+ 0x465 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xa5 , 1 | ArabicCommaSep , 130 , 143 , // 130 - dv-mv
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd2 , 1 | SemicolonSep , 132 , 240 , // 131 - dyo
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd2 , 1 | SemicolonSep , 132 , 240 , // 132 - dyo-sn
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x22 , 2 | SemicolonSep , 134 , 240 , // 133 - dz
+ 0xc51 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x22 , 2 | SemicolonSep , 134 , 240 , // 134 - dz-bt
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 | SemicolonSep , 136 , 240 , // 135 - ebu
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 | SemicolonSep , 136 , 240 , // 136 - ebu-ke
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x59 , 1 | SemicolonSep , 138 , 240 , // 137 - ee
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x59 , 1 | SemicolonSep , 138 , 240 , // 138 - ee-gh
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xe8 , 1 | SemicolonSep , 139 , 240 , // 139 - ee-tg
+ 0x8 , 0x4e5 , 0x2e1 , 0x2716, 0x4f31, 0x62 , 1 | SemicolonSep , 142 , 142 , // 140 - el
+ 0x1000 , 0x4e5 , 0x2e1 , 0x2716, 0x4f31, 0x3b , 1 | SemicolonSep , 141 , 240 , // 141 - el-cy
+ 0x408 , 0x4e5 , 0x2e1 , 0x2716, 0x4f31, 0x62 , 1 | SemicolonSep , 142 , 142 , // 142 - el-gr
+ 0x9 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xf4 , 1 | CommaSep , 240 , 240 , // 143 - en
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x989e, 1 | CommaSep , 144 , 240 , // 144 - en-001
+ 0x2409 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x993248, 1 | CommaSep , 145 , 145 , // 145 - en-029
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x292d, 1 | CommaSep , 146 , 240 , // 146 - en-150
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x2 , 1 | CommaSep , 147 , 240 , // 147 - en-ag
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x12c , 1 | CommaSep , 148 , 240 , // 148 - en-ai
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xa , 1 | CommaSep , 149 , 240 , // 149 - en-as
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xe , 1 | CommaSep , 150 , 240 , // 150 - en-at
+ 0xc09 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xc , 1 | CommaSep , 151 , 151 , // 151 - en-au
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x12 , 1 | CommaSep , 152 , 240 , // 152 - en-bb
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x15 , 1 | CommaSep , 153 , 240 , // 153 - en-be
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x26 , 1 | CommaSep , 154 , 240 , // 154 - en-bi
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x14 , 1 | CommaSep , 155 , 240 , // 155 - en-bm
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x16 , 1 | CommaSep , 156 , 240 , // 156 - en-bs
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x13 , 1 | CommaSep , 157 , 240 , // 157 - en-bw
+ 0x2809 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x18 , 1 | CommaSep , 158 , 158 , // 158 - en-bz
+ 0x1009 , 0x4e4 , 0x352 , 0x2710, 0x25 , 0x27 , 1 | CommaSep , 159 , 159 , // 159 - en-ca
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x137 , 1 | CommaSep , 160 , 240 , // 160 - en-cc
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xdf , 1 | CommaSep , 161 , 240 , // 161 - en-ch
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x138 , 1 | CommaSep , 162 , 240 , // 162 - en-ck
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x31 , 1 | CommaSep , 163 , 240 , // 163 - en-cm
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x135 , 1 | CommaSep , 164 , 240 , // 164 - en-cx
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x3b , 1 | CommaSep , 165 , 240 , // 165 - en-cy
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x5e , 1 | CommaSep , 166 , 240 , // 166 - en-de
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x3d , 1 | CommaSep , 167 , 240 , // 167 - en-dk
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x3f , 1 | CommaSep , 168 , 240 , // 168 - en-dm
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x47 , 1 | CommaSep , 169 , 240 , // 169 - en-er
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x4d , 1 | CommaSep , 170 , 240 , // 170 - en-fi
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x4e , 1 | CommaSep , 171 , 240 , // 171 - en-fj
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x13b , 1 | CommaSep , 172 , 240 , // 172 - en-fk
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x50 , 1 | CommaSep , 173 , 240 , // 173 - en-fm
+ 0x809 , 0x4e4 , 0x352 , 0x2710, 0x4f3d, 0xf2 , 1 | CommaSep , 174 , 174 , // 174 - en-gb
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x5b , 1 | CommaSep , 175 , 240 , // 175 - en-gd
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x144 , 1 | CommaSep , 176 , 240 , // 176 - en-gg
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x59 , 1 | CommaSep , 177 , 240 , // 177 - en-gh
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x5a , 1 | CommaSep , 178 , 240 , // 178 - en-gi
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x56 , 1 | CommaSep , 179 , 240 , // 179 - en-gm
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x142 , 1 | CommaSep , 180 , 240 , // 180 - en-gu
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x65 , 1 | CommaSep , 181 , 240 , // 181 - en-gy
+ 0x3c09 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x68 , 1 | CommaSep , 182 , 240 , // 182 - en-hk
+ 0x3809 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x6f , 1 | SemicolonSep , 183 , 240 , // 183 - en-id
+ 0x1809 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x44 , 1 | CommaSep , 184 , 184 , // 184 - en-ie
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x75 , 1 | CommaSep , 185 , 240 , // 185 - en-il
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x3b16, 1 | CommaSep , 186 , 240 , // 186 - en-im
+ 0x4009 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0x71 , 1 | CommaSep , 187 , 187 , // 187 - en-in
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x72 , 1 | CommaSep , 188 , 240 , // 188 - en-io
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x148 , 1 | CommaSep , 189 , 240 , // 189 - en-je
+ 0x2009 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x7c , 1 | CommaSep , 190 , 190 , // 190 - en-jm
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x81 , 1 | CommaSep , 191 , 240 , // 191 - en-ke
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x85 , 1 | CommaSep , 192 , 240 , // 192 - en-ki
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xcf , 1 | CommaSep , 193 , 240 , // 193 - en-kn
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x133 , 1 | CommaSep , 194 , 240 , // 194 - en-ky
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xda , 1 | CommaSep , 195 , 240 , // 195 - en-lc
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x8e , 1 | CommaSep , 196 , 240 , // 196 - en-lr
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x92 , 1 | CommaSep , 197 , 240 , // 197 - en-ls
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x95 , 1 | CommaSep , 198 , 240 , // 198 - en-mg
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xc7 , 1 | CommaSep , 199 , 240 , // 199 - en-mh
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x97 , 1 | CommaSep , 200 , 240 , // 200 - en-mo
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x151 , 1 | CommaSep , 201 , 240 , // 201 - en-mp
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x14c , 1 | CommaSep , 202 , 240 , // 202 - en-ms
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xa3 , 1 | CommaSep , 203 , 240 , // 203 - en-mt
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xa0 , 1 | CommaSep , 204 , 240 , // 204 - en-mu
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x9c , 1 | CommaSep , 205 , 240 , // 205 - en-mw
+ 0x4409 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xa7 , 1 | CommaSep , 206 , 206 , // 206 - en-my
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xfe , 1 | CommaSep , 207 , 240 , // 207 - en-na
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x150 , 1 | CommaSep , 208 , 240 , // 208 - en-nf
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xaf , 1 | CommaSep , 209 , 240 , // 209 - en-ng
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xb0 , 1 | CommaSep , 210 , 240 , // 210 - en-nl
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xb4 , 1 | CommaSep , 211 , 240 , // 211 - en-nr
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x14f , 1 | CommaSep , 212 , 240 , // 212 - en-nu
+ 0x1409 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xb7 , 1 | CommaSep , 213 , 213 , // 213 - en-nz
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xc2 , 1 | CommaSep , 214 , 240 , // 214 - en-pg
+ 0x3409 , 0x4e4 , 0x1b5 , 0x2710, 0x1f4 , 0xc9 , 1 | CommaSep , 215 , 215 , // 215 - en-ph
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xbe , 1 | CommaSep , 216 , 240 , // 216 - en-pk
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x153 , 1 | CommaSep , 217 , 240 , // 217 - en-pn
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xca , 1 | CommaSep , 218 , 240 , // 218 - en-pr
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xc3 , 1 | CommaSep , 219 , 240 , // 219 - en-pw
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xcc , 1 | CommaSep , 220 , 240 , // 220 - en-rw
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x1e , 1 | CommaSep , 221 , 240 , // 221 - en-sb
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd0 , 1 | CommaSep , 222 , 240 , // 222 - en-sc
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xdb , 1 | CommaSep , 223 , 240 , // 223 - en-sd
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xdd , 1 | CommaSep , 224 , 240 , // 224 - en-se
+ 0x4809 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xd7 , 1 | CommaSep , 225 , 225 , // 225 - en-sg
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x157 , 1 | CommaSep , 226 , 240 , // 226 - en-sh
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd4 , 1 | CommaSep , 227 , 240 , // 227 - en-si
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd5 , 1 | CommaSep , 228 , 240 , // 228 - en-sl
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x114 , 1 | CommaSep , 229 , 240 , // 229 - en-ss
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x78f7, 1 | CommaSep , 230 , 240 , // 230 - en-sx
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x104 , 1 | CommaSep , 231 , 240 , // 231 - en-sz
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x15d , 1 | CommaSep , 232 , 240 , // 232 - en-tc
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x15b , 1 | CommaSep , 233 , 240 , // 233 - en-tk
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xe7 , 1 | CommaSep , 234 , 240 , // 234 - en-to
+ 0x2c09 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xe1 , 1 | CommaSep , 235 , 235 , // 235 - en-tt
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xec , 1 | CommaSep , 236 , 240 , // 236 - en-tv
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xef , 1 | CommaSep , 237 , 240 , // 237 - en-tz
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xf0 , 1 | CommaSep , 238 , 240 , // 238 - en-ug
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x9a55d40,1 | CommaSep , 239 , 240 , // 239 - en-um
+ 0x409 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xf4 , 1 | CommaSep , 240 , 240 , // 240 - en-us
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xf8 , 1 | CommaSep , 241 , 240 , // 241 - en-vc
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x15f , 1 | CommaSep , 242 , 240 , // 242 - en-vg
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xfc , 1 | CommaSep , 243 , 240 , // 243 - en-vi
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xae , 1 | CommaSep , 244 , 240 , // 244 - en-vu
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x103 , 1 | CommaSep , 245 , 240 , // 245 - en-ws
+ 0x1c09 , 0x4e4 , 0x1b5 , 0x2710, 0x1f4 , 0xd1 , 1 | CommaSep , 246 , 246 , // 246 - en-za
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x107 , 1 | CommaSep , 247 , 240 , // 247 - en-zm
+ 0x3009 , 0x4e4 , 0x1b5 , 0x2710, 0x1f4 , 0x108 , 1 | CommaSep , 248 , 248 , // 248 - en-zw
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x989e, 1 | SemicolonSep , 250 , 240 , // 249 - eo
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x989e, 1 | SemicolonSep , 250 , 240 , // 250 - eo-001
+ 0xa , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xd9 , 1 | SemicolonSep , 262 , 262 , // 251 - es
+ 0x580a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x9a55d41, 1 | SemicolonSep , 252 , 240 , // 252 - es-419
+ 0x2c0a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xb , 1 | SemicolonSep , 253 , 253 , // 253 - es-ar
+ 0x400a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x1a , 1 | SemicolonSep , 254 , 254 , // 254 - es-bo
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x20 , 1 | SemicolonSep , 255 , 240 , // 255 - es-br
+ 0x340a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x2e , 1 | SemicolonSep , 256 , 256 , // 256 - es-cl
+ 0x240a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x33 , 1 | SemicolonSep , 257 , 257 , // 257 - es-co
+ 0x140a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x36 , 1 | SemicolonSep , 258 , 258 , // 258 - es-cr
+ 0x5c0a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x38 , 1 | SemicolonSep , 259 , 240 , // 259 - es-cu
+ 0x1c0a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x41 , 1 | SemicolonSep , 260 , 260 , // 260 - es-do
+ 0x300a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x42 , 1 | SemicolonSep , 261 , 261 , // 261 - es-ec
+ 0xc0a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xd9 , 1 | SemicolonSep , 262 , 262 , // 262 - es-es
+ 0x40a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xd9 , 1 | SemicolonSep , 263 , 263 , // 263 - es-es_tradnl
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x45 , 1 | SemicolonSep , 264 , 240 , // 264 - es-gq
+ 0x100a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x63 , 1 | SemicolonSep , 265 , 265 , // 265 - es-gt
+ 0x480a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x6a , 1 | SemicolonSep , 266 , 266 , // 266 - es-hn
+ 0x80a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xa6 , 1 | CommaSep , 267 , 267 , // 267 - es-mx
+ 0x4c0a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xb6 , 1 | SemicolonSep , 268 , 268 , // 268 - es-ni
+ 0x180a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xc0 , 1 | SemicolonSep , 269 , 269 , // 269 - es-pa
+ 0x280a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xbb , 1 | SemicolonSep , 270 , 270 , // 270 - es-pe
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xc9 , 1 | SemicolonSep , 271 , 240 , // 271 - es-ph
+ 0x500a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xca , 1 | SemicolonSep , 272 , 272 , // 272 - es-pr
+ 0x3c0a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xb9 , 1 | SemicolonSep , 273 , 273 , // 273 - es-py
+ 0x440a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x48 , 1 | SemicolonSep , 274 , 274 , // 274 - es-sv
+ 0x540a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xf4 , 1 | CommaSep , 275 , 275 , // 275 - es-us
+ 0x380a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xf6 , 1 | SemicolonSep , 276 , 276 , // 276 - es-uy
+ 0x200a , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xf9 , 1 | SemicolonSep , 277 , 277 , // 277 - es-ve
+ 0x25 , 0x4e9 , 0x307 , 0x272d, 0x1f4 , 0x46 , 1 | SemicolonSep , 279 , 279 , // 278 - et
+ 0x425 , 0x4e9 , 0x307 , 0x272d, 0x1f4 , 0x46 , 1 | SemicolonSep , 279 , 279 , // 279 - et-ee
+ 0x2d , 0x4e4 , 0x352 , 0x2 , 0x1f4 , 0xd9 , 1 | SemicolonSep , 281 , 240 , // 280 - eu
+ 0x42d , 0x4e4 , 0x352 , 0x2 , 0x1f4 , 0xd9 , 1 | SemicolonSep , 281 , 240 , // 281 - eu-es
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 | SemicolonSep , 283 , 240 , // 282 - ewo
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 | SemicolonSep , 283 , 240 , // 283 - ewo-cm
+ 0x29 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x74 , 0 | ArabicSemicolonSep, 285 , 143 , // 284 - fa
+ 0x429 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x74 , 0 | ArabicSemicolonSep, 285 , 143 , // 285 - fa-ir
+ 0x67 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xd2 , 1 | SemicolonSep , 290 , 290 , // 286 - ff
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x31 , 1 | SemicolonSep , 287 , 240 , // 287 - ff-cm
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x64 , 1 | SemicolonSep , 288 , 240 , // 288 - ff-gn
+ 0x7c67 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xd2 , 1 | SemicolonSep , 290 , 290 , // 289 - ff-latn
+ 0x867 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xd2 , 1 | SemicolonSep , 290 , 290 , // 290 - ff-latn-sn
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xa2 , 1 | SemicolonSep , 291 , 240 , // 291 - ff-mr
+ 0x467 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xaf , 1 | SemicolonSep , 292 , 240 , // 292 - ff-ng
+ 0xb , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0x4d , 1 | SemicolonSep , 294 , 294 , // 293 - fi
+ 0x40b , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0x4d , 1 | SemicolonSep , 294 , 294 , // 294 - fi-fi
+ 0x64 , 0x4e4 , 0x1b5 , 0x2710, 0x1f4 , 0xc9 , 1 | SemicolonSep , 296 , 296 , // 295 - fil
+ 0x464 , 0x4e4 , 0x1b5 , 0x2710, 0x1f4 , 0xc9 , 1 | SemicolonSep , 296 , 296 , // 296 - fil-ph
+ 0x38 , 0x4e4 , 0x352 , 0x275f, 0x4f35, 0x51 , 1 | SemicolonSep , 299 , 299 , // 297 - fo
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x3d , 1 | SemicolonSep , 298 , 240 , // 298 - fo-dk
+ 0x438 , 0x4e4 , 0x352 , 0x275f, 0x4f35, 0x51 , 1 | SemicolonSep , 299 , 299 , // 299 - fo-fo
+ 0xc , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x54 , 1 | SemicolonSep , 316 , 316 , // 300 - fr
+ 0x1c0c , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x993248, 1 | SemicolonSep , 301 , 316 , // 301 - fr-029
+ 0x80c , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x15 , 1 | SemicolonSep , 302 , 302 , // 302 - fr-be
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xf5 , 1 | SemicolonSep , 303 , 240 , // 303 - fr-bf
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x26 , 1 | SemicolonSep , 304 , 240 , // 304 - fr-bi
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x1c , 1 | SemicolonSep , 305 , 240 , // 305 - fr-bj
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x9a55c4f, 1 | SemicolonSep , 306 , 240 , // 306 - fr-bl
+ 0xc0c , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x27 , 1 | SemicolonSep , 307 , 307 , // 307 - fr-ca
+ 0x240c , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x2c , 1 | SemicolonSep , 308 , 240 , // 308 - fr-cd
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x37 , 1 | SemicolonSep , 309 , 240 , // 309 - fr-cf
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x2b , 1 | SemicolonSep , 310 , 240 , // 310 - fr-cg
+ 0x100c , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xdf , 1 | SemicolonSep , 311 , 311 , // 311 - fr-ch
+ 0x300c , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x77 , 1 | SemicolonSep , 312 , 240 , // 312 - fr-ci
+ 0x2c0c , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x31 , 1 | SemicolonSep , 313 , 240 , // 313 - fr-cm
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x3e , 1 | SemicolonSep , 314 , 240 , // 314 - fr-dj
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x4 , 1 | SemicolonSep , 315 , 240 , // 315 - fr-dz
+ 0x40c , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x54 , 1 | SemicolonSep , 316 , 316 , // 316 - fr-fr
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x57 , 1 | SemicolonSep , 317 , 240 , // 317 - fr-ga
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x13d , 1 | SemicolonSep , 318 , 240 , // 318 - fr-gf
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x64 , 1 | SemicolonSep , 319 , 240 , // 319 - fr-gn
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x141 , 1 | SemicolonSep , 320 , 240 , // 320 - fr-gp
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x45 , 1 | SemicolonSep , 321 , 240 , // 321 - fr-gq
+ 0x3c0c , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x67 , 1 | SemicolonSep , 322 , 240 , // 322 - fr-ht
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x32 , 1 | SemicolonSep , 323 , 240 , // 323 - fr-km
+ 0x140c , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x93 , 1 | SemicolonSep , 324 , 324 , // 324 - fr-lu
+ 0x380c , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x9f , 1 | SemicolonSep , 325 , 240 , // 325 - fr-ma
+ 0x180c , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x9e , 1 | SemicolonSep , 326 , 326 , // 326 - fr-mc
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x7bda, 1 | SemicolonSep , 327 , 240 , // 327 - fr-mf
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x95 , 1 | SemicolonSep , 328 , 240 , // 328 - fr-mg
+ 0x340c , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x9d , 1 | SemicolonSep , 329 , 240 , // 329 - fr-ml
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x14a , 1 | SemicolonSep , 330 , 240 , // 330 - fr-mq
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xa2 , 1 | SemicolonSep , 331 , 240 , // 331 - fr-mr
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xa0 , 1 | SemicolonSep , 332 , 240 , // 332 - fr-mu
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x14e , 1 | SemicolonSep , 333 , 240 , // 333 - fr-nc
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xad , 1 | SemicolonSep , 334 , 240 , // 334 - fr-ne
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x13e , 1 | SemicolonSep , 335 , 240 , // 335 - fr-pf
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xce , 1 | SemicolonSep , 336 , 240 , // 336 - fr-pm
+ 0x200c , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xc6 , 1 | SemicolonSep , 337 , 240 , // 337 - fr-re
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xcc , 1 | SemicolonSep , 338 , 240 , // 338 - fr-rw
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xd0 , 1 | SemicolonSep , 339 , 240 , // 339 - fr-sc
+ 0x280c , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xd2 , 1 | SemicolonSep , 340 , 240 , // 340 - fr-sn
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xde , 1 | SemicolonSep , 341 , 240 , // 341 - fr-sy
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x29 , 1 | SemicolonSep , 342 , 240 , // 342 - fr-td
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xe8 , 1 | SemicolonSep , 343 , 240 , // 343 - fr-tg
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xea , 1 | SemicolonSep , 344 , 240 , // 344 - fr-tn
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xae , 1 | SemicolonSep , 345 , 240 , // 345 - fr-vu
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x160 , 1 | SemicolonSep , 346 , 240 , // 346 - fr-wf
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x14b , 1 | SemicolonSep , 347 , 240 , // 347 - fr-yt
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x76 , 1 | SemicolonSep , 349 , 240 , // 348 - fur
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x76 , 1 | SemicolonSep , 349 , 240 , // 349 - fur-it
+ 0x62 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xb0 , 1 | SemicolonSep , 351 , 351 , // 350 - fy
+ 0x462 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xb0 , 1 | SemicolonSep , 351 , 351 , // 351 - fy-nl
+ 0x3c , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x44 , 1 | SemicolonSep , 353 , 353 , // 352 - ga
+ 0x83c , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x44 , 1 | SemicolonSep , 353 , 353 , // 353 - ga-ie
+ 0x91 , 0x4e4 , 0x352 , 0x2710, 0x4f3d, 0xf2 , 1 | SemicolonSep , 355 , 355 , // 354 - gd
+ 0x491 , 0x4e4 , 0x352 , 0x2710, 0x4f3d, 0xf2 , 1 | SemicolonSep , 355 , 355 , // 355 - gd-gb
+ 0x56 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd9 , 1 | SemicolonSep , 357 , 357 , // 356 - gl
+ 0x456 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd9 , 1 | SemicolonSep , 357 , 357 , // 357 - gl-es
+ 0x74 , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xb9 , 1 | CommaSep , 359 , 359 , // 358 - gn
+ 0x474 , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xb9 , 1 | CommaSep , 359 , 359 , // 359 - gn-py
+ 0x84 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xdf , 1 | SemicolonSep , 361 , 240 , // 360 - gsw
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xdf , 1 | SemicolonSep , 361 , 240 , // 361 - gsw-ch
+ 0x484 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x54 , 1 | SemicolonSep , 362 , 362 , // 362 - gsw-fr
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x91 , 1 | SemicolonSep , 363 , 240 , // 363 - gsw-li
+ 0x47 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | CommaSep , 365 , 143 , // 364 - gu
+ 0x447 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | CommaSep , 365 , 143 , // 365 - gu-in
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 | SemicolonSep , 367 , 240 , // 366 - guz
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 | SemicolonSep , 367 , 240 , // 367 - guz-ke
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x3b16, 1 | SemicolonSep , 369 , 240 , // 368 - gv
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x3b16, 1 | SemicolonSep , 369 , 240 , // 369 - gv-im
+ 0x68 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xaf , 1 | SemicolonSep , 374 , 374 , // 370 - ha
+ 0x7c68 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xaf , 1 | SemicolonSep , 374 , 374 , // 371 - ha-latn
+ 0x1000 , 0x4e4 , 0x1b5 , 0x2710, 0x1f4 , 0x59 , 1 | SemicolonSep , 372 , 240 , // 372 - ha-latn-gh
+ 0x1000 , 0x4e4 , 0x1b5 , 0x2710, 0x1f4 , 0xad , 1 | SemicolonSep , 373 , 240 , // 373 - ha-latn-ne
+ 0x468 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xaf , 1 | SemicolonSep , 374 , 374 , // 374 - ha-latn-ng
+ 0x75 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xf4 , 1 | SemicolonSep , 376 , 376 , // 375 - haw
+ 0x475 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xf4 , 1 | SemicolonSep , 376 , 376 , // 376 - haw-us
+ 0xd , 0x4e7 , 0x35e , 0x2715, 0x1f4 , 0x75 , 1 | CommaSep , 378 , 143 , // 377 - he
+ 0x40d , 0x4e7 , 0x35e , 0x2715, 0x1f4 , 0x75 , 1 | CommaSep , 378 , 143 , // 378 - he-il
+ 0x39 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | CommaSep , 380 , 143 , // 379 - hi
+ 0x439 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | CommaSep , 380 , 143 , // 380 - hi-in
+ 0x1a , 0x4e2 , 0x354 , 0x2762, 0x1f4 , 0x6c , 1 | SemicolonSep , 383 , 383 , // 381 - hr
+ 0x101a , 0x4e2 , 0x354 , 0x2762, 0x366 , 0x19 , 1 | SemicolonSep , 382 , 382 , // 382 - hr-ba
+ 0x41a , 0x4e2 , 0x354 , 0x2762, 0x1f4 , 0x6c , 1 | SemicolonSep , 383 , 383 , // 383 - hr-hr
+ 0x2e , 0x4e4 , 0x352 , 0x2710, 0x366 , 0x5e , 1 | SemicolonSep , 385 , 385 , // 384 - hsb
+ 0x42e , 0x4e4 , 0x352 , 0x2710, 0x366 , 0x5e , 1 | SemicolonSep , 385 , 385 , // 385 - hsb-de
+ 0xe , 0x4e2 , 0x354 , 0x272d, 0x1f4 , 0x6d , 1 | SemicolonSep , 387 , 387 , // 386 - hu
+ 0x40e , 0x4e2 , 0x354 , 0x272d, 0x1f4 , 0x6d , 1 | SemicolonSep , 387 , 387 , // 387 - hu-hu
+ 0x1040e, 0x4e2 , 0x354 , 0x272d, 0x1f4 , 0x6d , 1 | SemicolonSep , 387 , 387 , // 388 - hu-hu_technl
+ 0x2b , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x7 , 1 | CommaSep , 390 , 390 , // 389 - hy
+ 0x42b , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x7 , 1 | CommaSep , 390 , 390 , // 390 - hy-am
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x54 , 1 | SemicolonSep , 393 , 240 , // 391 - ia
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x989e, 1 | SemicolonSep , 392 , 240 , // 392 - ia-001
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x54 , 1 | SemicolonSep , 393 , 240 , // 393 - ia-fr
+ 0x69 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xaf , 1 | SemicolonSep , 395 , 240 , // 394 - ibb
+ 0x469 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xaf , 1 | SemicolonSep , 395 , 240 , // 395 - ibb-ng
+ 0x21 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x6f , 1 | SemicolonSep , 397 , 397 , // 396 - id
+ 0x421 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x6f , 1 | SemicolonSep , 397 , 397 , // 397 - id-id
+ 0x70 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xaf , 1 | SemicolonSep , 399 , 399 , // 398 - ig
+ 0x470 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xaf , 1 | SemicolonSep , 399 , 399 , // 399 - ig-ng
+ 0x78 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x2d , 1 | SemicolonSep , 401 , 143 , // 400 - ii
+ 0x478 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x2d , 1 | SemicolonSep , 401 , 143 , // 401 - ii-cn
+ 0xf , 0x4e4 , 0x352 , 0x275f, 0x5187, 0x6e , 1 | SemicolonSep , 403 , 403 , // 402 - is
+ 0x40f , 0x4e4 , 0x352 , 0x275f, 0x5187, 0x6e , 1 | SemicolonSep , 403 , 403 , // 403 - is-is
+ 0x10 , 0x4e4 , 0x352 , 0x2710, 0x4f38, 0x76 , 1 | SemicolonSep , 406 , 406 , // 404 - it
+ 0x810 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xdf , 1 | SemicolonSep , 405 , 405 , // 405 - it-ch
+ 0x410 , 0x4e4 , 0x352 , 0x2710, 0x4f38, 0x76 , 1 | SemicolonSep , 406 , 406 , // 406 - it-it
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f38, 0xd6 , 1 | SemicolonSep , 407 , 240 , // 407 - it-sm
+ 0x5d , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0x27 , 1 | CommaSep , 412 , 412 , // 408 - iu
+ 0x785d , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x27 , 1 | CommaSep , 410 , 143 , // 409 - iu-cans
+ 0x45d , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x27 , 1 | CommaSep , 410 , 143 , // 410 - iu-cans-ca
+ 0x7c5d , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0x27 , 1 | CommaSep , 412 , 412 , // 411 - iu-latn
+ 0x85d , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0x27 , 1 | CommaSep , 412 , 412 , // 412 - iu-latn-ca
+ 0x11 , 0x3a4 , 0x3a4 , 0x2711, 0x4f42, 0x7a , 1 | CommaSep , 414 , 414 , // 413 - ja
+ 0x411 , 0x3a4 , 0x3a4 , 0x2711, 0x4f42, 0x7a , 1 | CommaSep , 414 , 414 , // 414 - ja-jp
+ 0x40411, 0x3a4 , 0x3a4 , 0x2711, 0x4f42, 0x7a , 1 | CommaSep , 414 , 414 , // 415 - ja-jp_radstr
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 | SemicolonSep , 417 , 240 , // 416 - jgo
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 | SemicolonSep , 417 , 240 , // 417 - jgo-cm
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 | SemicolonSep , 419 , 240 , // 418 - jmc
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 | SemicolonSep , 419 , 240 , // 419 - jmc-tz
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x6f , 1 | SemicolonSep , 424 , 424 , // 420 - jv
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x6f , 1 | SemicolonSep , 422 , 424 , // 421 - jv-java
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x6f , 1 | SemicolonSep , 422 , 424 , // 422 - jv-java-id
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x6f , 1 | SemicolonSep , 424 , 424 , // 423 - jv-latn
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x6f , 1 | SemicolonSep , 424 , 424 , // 424 - jv-latn-id
+ 0x37 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x58 , 1 | SemicolonSep , 426 , 426 , // 425 - ka
+ 0x437 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x58 , 1 | SemicolonSep , 426 , 426 , // 426 - ka-ge
+ 0x10437, 0x0 , 0x1 , 0x2 , 0x1f4 , 0x58 , 1 | SemicolonSep , 426 , 426 , // 427 - ka-ge_modern
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x4 , 1 | SemicolonSep , 429 , 240 , // 428 - kab
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x4 , 1 | SemicolonSep , 429 , 240 , // 429 - kab-dz
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 | SemicolonSep , 431 , 240 , // 430 - kam
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 | SemicolonSep , 431 , 240 , // 431 - kam-ke
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 | SemicolonSep , 433 , 240 , // 432 - kde
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 | SemicolonSep , 433 , 240 , // 433 - kde-tz
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x39 , 1 | SemicolonSep , 435 , 240 , // 434 - kea
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x39 , 1 | SemicolonSep , 435 , 240 , // 435 - kea-cv
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9d , 1 | SemicolonSep , 437 , 240 , // 436 - khq
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9d , 1 | SemicolonSep , 437 , 240 , // 437 - khq-ml
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 | SemicolonSep , 439 , 240 , // 438 - ki
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 | SemicolonSep , 439 , 240 , // 439 - ki-ke
+ 0x3f , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x89 , 1 | SemicolonSep , 441 , 441 , // 440 - kk
+ 0x43f , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x89 , 1 | SemicolonSep , 441 , 441 , // 441 - kk-kz
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 | SemicolonSep , 443 , 240 , // 442 - kkj
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 | SemicolonSep , 443 , 240 , // 443 - kkj-cm
+ 0x6f , 0x4e4 , 0x352 , 0x2710, 0x4f35, 0x5d , 1 | SemicolonSep , 445 , 445 , // 444 - kl
+ 0x46f , 0x4e4 , 0x352 , 0x2710, 0x4f35, 0x5d , 1 | SemicolonSep , 445 , 445 , // 445 - kl-gl
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 | SemicolonSep , 447 , 240 , // 446 - kln
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 | SemicolonSep , 447 , 240 , // 447 - kln-ke
+ 0x53 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x28 , 2 | CommaSep , 449 , 143 , // 448 - km
+ 0x453 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x28 , 2 | CommaSep , 449 , 143 , // 449 - km-kh
+ 0x4b , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | CommaSep , 451 , 143 , // 450 - kn
+ 0x44b , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | CommaSep , 451 , 143 , // 451 - kn-in
+ 0x12 , 0x3b5 , 0x3b5 , 0x2713, 0x5161, 0x86 , 1 | CommaSep , 454 , 454 , // 452 - ko
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x83 , 1 | SemicolonSep , 453 , 240 , // 453 - ko-kp
+ 0x412 , 0x3b5 , 0x3b5 , 0x2713, 0x5161, 0x86 , 1 | CommaSep , 454 , 454 , // 454 - ko-kr
+ 0x57 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | CommaSep , 456 , 143 , // 455 - kok
+ 0x457 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | CommaSep , 456 , 143 , // 456 - kok-in
+ 0x71 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xaf , 1 | SemicolonSep , 458 , 240 , // 457 - kr
+ 0x471 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xaf , 1 | SemicolonSep , 458 , 240 , // 458 - kr-ng
+ 0x60 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 2 | SemicolonSep , 461 , 240 , // 459 - ks
+ 0x460 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 2 | SemicolonSep , 461 , 240 , // 460 - ks-arab
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 2 | SemicolonSep , 461 , 240 , // 461 - ks-arab-in
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | CommaSep , 463 , 187 , // 462 - ks-deva
+ 0x860 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | CommaSep , 463 , 187 , // 463 - ks-deva-in
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 | SemicolonSep , 465 , 240 , // 464 - ksb
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 | SemicolonSep , 465 , 240 , // 465 - ksb-tz
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 | SemicolonSep , 467 , 240 , // 466 - ksf
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 | SemicolonSep , 467 , 240 , // 467 - ksf-cm
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x5e , 1 | SemicolonSep , 469 , 240 , // 468 - ksh
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x5e , 1 | SemicolonSep , 469 , 240 , // 469 - ksh-de
+ 0x92 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x79 , 0 | ArabicSemicolonSep, 472 , 143 , // 470 - ku
+ 0x7c92 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x79 , 0 | ArabicSemicolonSep, 472 , 143 , // 471 - ku-arab
+ 0x492 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x79 , 0 | ArabicSemicolonSep, 472 , 143 , // 472 - ku-arab-iq
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x74 , 0 | SemicolonSep , 473 , 240 , // 473 - ku-arab-ir
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf2 , 1 | SemicolonSep , 475 , 240 , // 474 - kw
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf2 , 1 | SemicolonSep , 475 , 240 , // 475 - kw-gb
+ 0x40 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0x82 , 1 | SemicolonSep , 477 , 477 , // 476 - ky
+ 0x440 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0x82 , 1 | SemicolonSep , 477 , 477 , // 477 - ky-kg
+ 0x76 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0x989e, 1 | CommaSep , 479 , 143 , // 478 - la
+ 0x476 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0x989e, 1 | CommaSep , 479 , 143 , // 479 - la-001
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 | SemicolonSep , 481 , 240 , // 480 - lag
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 | SemicolonSep , 481 , 240 , // 481 - lag-tz
+ 0x6e , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x93 , 1 | SemicolonSep , 483 , 483 , // 482 - lb
+ 0x46e , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x93 , 1 | SemicolonSep , 483 , 483 , // 483 - lb-lu
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf0 , 1 | SemicolonSep , 485 , 240 , // 484 - lg
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf0 , 1 | SemicolonSep , 485 , 240 , // 485 - lg-ug
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf4 , 1 | SemicolonSep , 487 , 240 , // 486 - lkt
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf4 , 1 | SemicolonSep , 487 , 240 , // 487 - lkt-us
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x2c , 1 | SemicolonSep , 490 , 240 , // 488 - ln
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9 , 1 | SemicolonSep , 489 , 240 , // 489 - ln-ao
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x2c , 1 | SemicolonSep , 490 , 240 , // 490 - ln-cd
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x37 , 1 | SemicolonSep , 491 , 240 , // 491 - ln-cf
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x2b , 1 | SemicolonSep , 492 , 240 , // 492 - ln-cg
+ 0x54 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x8a , 1 | SemicolonSep , 494 , 143 , // 493 - lo
+ 0x454 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x8a , 1 | SemicolonSep , 494 , 143 , // 494 - lo-la
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x74 , 2 | SemicolonSep , 497 , 240 , // 495 - lrc
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x79 , 2 | SemicolonSep , 496 , 240 , // 496 - lrc-iq
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x74 , 2 | SemicolonSep , 497 , 240 , // 497 - lrc-ir
+ 0x27 , 0x4e9 , 0x307 , 0x272d, 0x1f4 , 0x8d , 1 | SemicolonSep , 499 , 499 , // 498 - lt
+ 0x427 , 0x4e9 , 0x307 , 0x272d, 0x1f4 , 0x8d , 1 | SemicolonSep , 499 , 499 , // 499 - lt-lt
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x2c , 1 | SemicolonSep , 501 , 240 , // 500 - lu
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x2c , 1 | SemicolonSep , 501 , 240 , // 501 - lu-cd
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 | SemicolonSep , 503 , 240 , // 502 - luo
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 | SemicolonSep , 503 , 240 , // 503 - luo-ke
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 | SemicolonSep , 505 , 240 , // 504 - luy
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 | SemicolonSep , 505 , 240 , // 505 - luy-ke
+ 0x26 , 0x4e9 , 0x307 , 0x272d, 0x1f4 , 0x8c , 1 | SemicolonSep , 507 , 507 , // 506 - lv
+ 0x426 , 0x4e9 , 0x307 , 0x272d, 0x1f4 , 0x8c , 1 | SemicolonSep , 507 , 507 , // 507 - lv-lv
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 | SemicolonSep , 509 , 240 , // 508 - mas
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 | SemicolonSep , 509 , 240 , // 509 - mas-ke
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 | SemicolonSep , 510 , 240 , // 510 - mas-tz
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 | SemicolonSep , 512 , 240 , // 511 - mer
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 | SemicolonSep , 512 , 240 , // 512 - mer-ke
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xa0 , 1 | SemicolonSep , 514 , 240 , // 513 - mfe
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xa0 , 1 | SemicolonSep , 514 , 240 , // 514 - mfe-mu
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x95 , 1 | SemicolonSep , 516 , 240 , // 515 - mg
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x95 , 1 | SemicolonSep , 516 , 240 , // 516 - mg-mg
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xa8 , 1 | SemicolonSep , 518 , 240 , // 517 - mgh
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xa8 , 1 | SemicolonSep , 518 , 240 , // 518 - mgh-mz
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 | SemicolonSep , 520 , 240 , // 519 - mgo
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 | SemicolonSep , 520 , 240 , // 520 - mgo-cm
+ 0x81 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xb7 , 1 | CommaSep , 522 , 522 , // 521 - mi
+ 0x481 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xb7 , 1 | CommaSep , 522 , 522 , // 522 - mi-nz
+ 0x2f , 0x4e3 , 0x362 , 0x2717, 0x1f4 , 0x4ca2, 1 | SemicolonSep , 524 , 524 , // 523 - mk
+ 0x42f , 0x4e3 , 0x362 , 0x2717, 0x1f4 , 0x4ca2, 1 | SemicolonSep , 524 , 524 , // 524 - mk-mk
+ 0x4c , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | SemicolonSep , 526 , 143 , // 525 - ml
+ 0x44c , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | SemicolonSep , 526 , 143 , // 526 - ml-in
+ 0x50 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0x9a , 1 | SemicolonSep , 529 , 529 , // 527 - mn
+ 0x7850 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0x9a , 1 | SemicolonSep , 529 , 529 , // 528 - mn-cyrl
+ 0x450 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0x9a , 1 | SemicolonSep , 529 , 529 , // 529 - mn-mn
+ 0x7c50 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x2d , 1 | CommaSep , 531 , 531 , // 530 - mn-mong
+ 0x850 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x2d , 1 | CommaSep , 531 , 531 , // 531 - mn-mong-cn
+ 0xc50 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9a , 1 | CommaSep , 532 , 532 , // 532 - mn-mong-mn
+ 0x58 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | CommaSep , 534 , 187 , // 533 - mni
+ 0x458 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | CommaSep , 534 , 187 , // 534 - mni-in
+ 0x7c , 0x4e4 , 0x352 , 0x2710, 0x25 , 0x27 , 1 | CommaSep , 536 , 240 , // 535 - moh
+ 0x47c , 0x4e4 , 0x352 , 0x2710, 0x25 , 0x27 , 1 | CommaSep , 536 , 240 , // 536 - moh-ca
+ 0x4e , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | CommaSep , 538 , 143 , // 537 - mr
+ 0x44e , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | CommaSep , 538 , 143 , // 538 - mr-in
+ 0x3e , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xa7 , 1 | SemicolonSep , 541 , 541 , // 539 - ms
+ 0x83e , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x25 , 1 | SemicolonSep , 540 , 540 , // 540 - ms-bn
+ 0x43e , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xa7 , 1 | SemicolonSep , 541 , 541 , // 541 - ms-my
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd7 , 1 | SemicolonSep , 542 , 240 , // 542 - ms-sg
+ 0x3a , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xa3 , 1 | SemicolonSep , 544 , 544 , // 543 - mt
+ 0x43a , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xa3 , 1 | SemicolonSep , 544 , 544 , // 544 - mt-mt
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 | SemicolonSep , 546 , 240 , // 545 - mua
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 | SemicolonSep , 546 , 240 , // 546 - mua-cm
+ 0x55 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x1b , 2 | SemicolonSep , 548 , 240 , // 547 - my
+ 0x455 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x1b , 2 | SemicolonSep , 548 , 240 , // 548 - my-mm
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x74 , 2 | SemicolonSep , 550 , 240 , // 549 - mzn
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x74 , 2 | SemicolonSep , 550 , 240 , // 550 - mzn-ir
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xfe , 1 | SemicolonSep , 552 , 240 , // 551 - naq
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xfe , 1 | SemicolonSep , 552 , 240 , // 552 - naq-na
+ 0x7c14 , 0x4e4 , 0x352 , 0x2710, 0x4f35, 0xb1 , 1 | SemicolonSep , 554 , 554 , // 553 - nb
+ 0x414 , 0x4e4 , 0x352 , 0x2710, 0x4f35, 0xb1 , 1 | SemicolonSep , 554 , 554 , // 554 - nb-no
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f35, 0xdc , 1 | SemicolonSep , 555 , 240 , // 555 - nb-sj
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x108 , 1 | SemicolonSep , 557 , 240 , // 556 - nd
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x108 , 1 | SemicolonSep , 557 , 240 , // 557 - nd-zw
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x5e , 1 | SemicolonSep , 559 , 240 , // 558 - nds
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x5e , 1 | SemicolonSep , 559 , 240 , // 559 - nds-de
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xb0 , 1 | SemicolonSep , 560 , 240 , // 560 - nds-nl
+ 0x61 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xb2 , 1 | CommaSep , 563 , 143 , // 561 - ne
+ 0x861 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 2 | SemicolonSep , 562 , 240 , // 562 - ne-in
+ 0x461 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xb2 , 1 | CommaSep , 563 , 143 , // 563 - ne-np
+ 0x13 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xb0 , 1 | SemicolonSep , 569 , 569 , // 564 - nl
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x12e , 1 | SemicolonSep , 565 , 240 , // 565 - nl-aw
+ 0x813 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x15 , 1 | SemicolonSep , 566 , 566 , // 566 - nl-be
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x9a55d42, 1 | SemicolonSep , 567 , 240 , // 567 - nl-bq
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x111 , 1 | SemicolonSep , 568 , 240 , // 568 - nl-cw
+ 0x413 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xb0 , 1 | SemicolonSep , 569 , 569 , // 569 - nl-nl
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xb5 , 1 | SemicolonSep , 570 , 240 , // 570 - nl-sr
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x78f7, 1 | SemicolonSep , 571 , 240 , // 571 - nl-sx
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 | SemicolonSep , 573 , 240 , // 572 - nmg
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 | SemicolonSep , 573 , 240 , // 573 - nmg-cm
+ 0x7814 , 0x4e4 , 0x352 , 0x2710, 0x4f35, 0xb1 , 1 | SemicolonSep , 575 , 575 , // 574 - nn
+ 0x814 , 0x4e4 , 0x352 , 0x2710, 0x4f35, 0xb1 , 1 | SemicolonSep , 575 , 575 , // 575 - nn-no
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 | SemicolonSep , 577 , 240 , // 576 - nnh
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 | SemicolonSep , 577 , 240 , // 577 - nnh-cm
+ 0x14 , 0x4e4 , 0x352 , 0x2710, 0x4f35, 0xb1 , 1 | SemicolonSep , 554 , 554 , // 578 - no
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x64 , 2 | ArabicCommaSep , 580 , 143 , // 579 - nqo
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x64 , 2 | ArabicCommaSep , 580 , 143 , // 580 - nqo-gn
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd1 , 1 | SemicolonSep , 582 , 240 , // 581 - nr
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd1 , 1 | SemicolonSep , 582 , 240 , // 582 - nr-za
+ 0x6c , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd1 , 1 | SemicolonSep , 584 , 584 , // 583 - nso
+ 0x46c , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd1 , 1 | SemicolonSep , 584 , 584 , // 584 - nso-za
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x114 , 1 | SemicolonSep , 586 , 240 , // 585 - nus
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x114 , 1 | SemicolonSep , 586 , 240 , // 586 - nus-ss
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf0 , 1 | SemicolonSep , 588 , 240 , // 587 - nyn
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf0 , 1 | SemicolonSep , 588 , 240 , // 588 - nyn-ug
+ 0x82 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x54 , 1 | SemicolonSep , 590 , 590 , // 589 - oc
+ 0x482 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x54 , 1 | SemicolonSep , 590 , 590 , // 590 - oc-fr
+ 0x72 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x49 , 1 | SemicolonSep , 592 , 240 , // 591 - om
+ 0x472 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x49 , 1 | SemicolonSep , 592 , 240 , // 592 - om-et
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 | SemicolonSep , 593 , 240 , // 593 - om-ke
+ 0x48 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | CommaSep , 595 , 143 , // 594 - or
+ 0x448 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | CommaSep , 595 , 143 , // 595 - or-in
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x58 , 1 | SemicolonSep , 597 , 240 , // 596 - os
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x58 , 1 | SemicolonSep , 597 , 240 , // 597 - os-ge
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xcb , 1 | SemicolonSep , 598 , 240 , // 598 - os-ru
+ 0x46 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | CommaSep , 602 , 143 , // 599 - pa
+ 0x7c46 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xbe , 2 | SemicolonSep , 601 , 143 , // 600 - pa-arab
+ 0x846 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xbe , 2 | SemicolonSep , 601 , 143 , // 601 - pa-arab-pk
+ 0x446 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | CommaSep , 602 , 143 , // 602 - pa-in
+ 0x79 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x993248, 1 | CommaSep , 604 , 145 , // 603 - pap
+ 0x479 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x993248, 1 | CommaSep , 604 , 145 , // 604 - pap-029
+ 0x15 , 0x4e2 , 0x354 , 0x272d, 0x5190, 0xbf , 1 | SemicolonSep , 606 , 606 , // 605 - pl
+ 0x415 , 0x4e2 , 0x354 , 0x272d, 0x5190, 0xbf , 1 | SemicolonSep , 606 , 606 , // 606 - pl-pl
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x989e, 1 | SemicolonSep , 608 , 240 , // 607 - prg
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x989e, 1 | SemicolonSep , 608 , 240 , // 608 - prg-001
+ 0x8c , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x3 , 2 | SemicolonSep , 610 , 143 , // 609 - prs
+ 0x48c , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x3 , 2 | SemicolonSep , 610 , 143 , // 610 - prs-af
+ 0x63 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x3 , 2 | SemicolonSep , 612 , 143 , // 611 - ps
+ 0x463 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x3 , 2 | SemicolonSep , 612 , 143 , // 612 - ps-af
+ 0x16 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x20 , 1 | SemicolonSep , 615 , 615 , // 613 - pt
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x9 , 1 | SemicolonSep , 614 , 240 , // 614 - pt-ao
+ 0x416 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x20 , 1 | SemicolonSep , 615 , 615 , // 615 - pt-br
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xdf , 1 | SemicolonSep , 616 , 240 , // 616 - pt-ch
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x39 , 1 | SemicolonSep , 617 , 240 , // 617 - pt-cv
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x45 , 1 | SemicolonSep , 618 , 240 , // 618 - pt-gq
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xc4 , 1 | SemicolonSep , 619 , 240 , // 619 - pt-gw
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x93 , 1 | SemicolonSep , 620 , 240 , // 620 - pt-lu
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x97 , 1 | SemicolonSep , 621 , 240 , // 621 - pt-mo
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xa8 , 1 | SemicolonSep , 622 , 240 , // 622 - pt-mz
+ 0x816 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xc1 , 1 | SemicolonSep , 623 , 623 , // 623 - pt-pt
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xe9 , 1 | SemicolonSep , 624 , 240 , // 624 - pt-st
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x6f60e7,1| SemicolonSep , 625 , 240 , // 625 - pt-tl
+ 0x901 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x7c , 1 | CommaSep , 626 , 190 , // 626 - qps-latn-x-sh
+ 0x501 , 0x4e2 , 0x354 , 0x272d, 0x5190, 0xf4 , 1 | DoubleCommaSep , 627 , 627 , // 627 - qps-ploc
+ 0x5fe , 0x3a4 , 0x3a4 , 0x2711, 0x4f42, 0x7a , 1 | CommaSep , 628 , 628 , // 628 - qps-ploca
+ 0x9ff , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xcd , 0 | SemicolonSep , 629 , 143 , // 629 - qps-plocm
+ 0x86 , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x63 , 1 | CommaSep , 632 , 632 , // 630 - quc
+ 0x7c86 , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x63 , 1 | CommaSep , 632 , 632 , // 631 - quc-latn
+ 0x486 , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x63 , 1 | CommaSep , 632 , 632 , // 632 - quc-latn-gt
+ 0x6b , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x1a , 1 | CommaSep , 634 , 634 , // 633 - quz
+ 0x46b , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x1a , 1 | CommaSep , 634 , 634 , // 634 - quz-bo
+ 0x86b , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0x42 , 1 | CommaSep , 635 , 635 , // 635 - quz-ec
+ 0xc6b , 0x4e4 , 0x352 , 0x2710, 0x4f3c, 0xbb , 1 | CommaSep , 636 , 636 , // 636 - quz-pe
+ 0x17 , 0x4e4 , 0x352 , 0x2710, 0x4f31, 0xdf , 1 | SemicolonSep , 638 , 638 , // 637 - rm
+ 0x417 , 0x4e4 , 0x352 , 0x2710, 0x4f31, 0xdf , 1 | SemicolonSep , 638 , 638 , // 638 - rm-ch
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x26 , 1 | SemicolonSep , 640 , 240 , // 639 - rn
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x26 , 1 | SemicolonSep , 640 , 240 , // 640 - rn-bi
+ 0x18 , 0x4e2 , 0x354 , 0x272d, 0x5190, 0xc8 , 1 | SemicolonSep , 643 , 643 , // 641 - ro
+ 0x818 , 0x4e2 , 0x354 , 0x2 , 0x1f4 , 0x98 , 1 | SemicolonSep , 642 , 240 , // 642 - ro-md
+ 0x418 , 0x4e2 , 0x354 , 0x272d, 0x5190, 0xc8 , 1 | SemicolonSep , 643 , 643 , // 643 - ro-ro
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 | SemicolonSep , 645 , 240 , // 644 - rof
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 | SemicolonSep , 645 , 240 , // 645 - rof-tz
+ 0x19 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0xcb , 1 | SemicolonSep , 651 , 651 , // 646 - ru
+ 0x1000 , 0x4e3 , 0x362 , 0x2 , 0x1f4 , 0x1d , 1 | SemicolonSep , 647 , 240 , // 647 - ru-by
+ 0x1000 , 0x4e3 , 0x362 , 0x2 , 0x1f4 , 0x82 , 1 | SemicolonSep , 648 , 240 , // 648 - ru-kg
+ 0x1000 , 0x4e3 , 0x362 , 0x2 , 0x1f4 , 0x89 , 1 | SemicolonSep , 649 , 240 , // 649 - ru-kz
+ 0x819 , 0x4e3 , 0x362 , 0x2 , 0x1f4 , 0x98 , 1 | SemicolonSep , 650 , 240 , // 650 - ru-md
+ 0x419 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0xcb , 1 | SemicolonSep , 651 , 651 , // 651 - ru-ru
+ 0x1000 , 0x4e3 , 0x362 , 0x2 , 0x1f4 , 0xf1 , 1 | SemicolonSep , 652 , 240 , // 652 - ru-ua
+ 0x87 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xcc , 1 | SemicolonSep , 654 , 654 , // 653 - rw
+ 0x487 , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xcc , 1 | SemicolonSep , 654 , 654 , // 654 - rw-rw
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 | SemicolonSep , 656 , 240 , // 655 - rwk
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 | SemicolonSep , 656 , 240 , // 656 - rwk-tz
+ 0x4f , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | CommaSep , 658 , 143 , // 657 - sa
+ 0x44f , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | CommaSep , 658 , 143 , // 658 - sa-in
+ 0x85 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0xcb , 1 | SemicolonSep , 660 , 660 , // 659 - sah
+ 0x485 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0xcb , 1 | SemicolonSep , 660 , 660 , // 660 - sah-ru
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 | SemicolonSep , 662 , 240 , // 661 - saq
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 | SemicolonSep , 662 , 240 , // 662 - saq-ke
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 | SemicolonSep , 664 , 240 , // 663 - sbp
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 | SemicolonSep , 664 , 240 , // 664 - sbp-tz
+ 0x59 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xbe , 2 | SemicolonSep , 667 , 143 , // 665 - sd
+ 0x7c59 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xbe , 2 | SemicolonSep , 667 , 143 , // 666 - sd-arab
+ 0x859 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xbe , 2 | SemicolonSep , 667 , 143 , // 667 - sd-arab-pk
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | CommaSep , 669 , 187 , // 668 - sd-deva
+ 0x459 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | CommaSep , 669 , 187 , // 669 - sd-deva-in
+ 0x3b , 0x4e4 , 0x352 , 0x2710, 0x4f35, 0xb1 , 1 | SemicolonSep , 672 , 672 , // 670 - se
+ 0xc3b , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0x4d , 1 | SemicolonSep , 671 , 671 , // 671 - se-fi
+ 0x43b , 0x4e4 , 0x352 , 0x2710, 0x4f35, 0xb1 , 1 | SemicolonSep , 672 , 672 , // 672 - se-no
+ 0x83b , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0xdd , 1 | SemicolonSep , 673 , 673 , // 673 - se-se
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xa8 , 1 | SemicolonSep , 675 , 240 , // 674 - seh
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xa8 , 1 | SemicolonSep , 675 , 240 , // 675 - seh-mz
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9d , 1 | SemicolonSep , 677 , 240 , // 676 - ses
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9d , 1 | SemicolonSep , 677 , 240 , // 677 - ses-ml
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x37 , 1 | SemicolonSep , 679 , 240 , // 678 - sg
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x37 , 1 | SemicolonSep , 679 , 240 , // 679 - sg-cf
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9f , 1 | SemicolonSep , 684 , 240 , // 680 - shi
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9f , 1 | SemicolonSep , 682 , 240 , // 681 - shi-latn
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9f , 1 | SemicolonSep , 682 , 240 , // 682 - shi-latn-ma
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9f , 1 | SemicolonSep , 684 , 240 , // 683 - shi-tfng
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9f , 1 | SemicolonSep , 684 , 240 , // 684 - shi-tfng-ma
+ 0x5b , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x2a , 1 | SemicolonSep , 686 , 143 , // 685 - si
+ 0x45b , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x2a , 1 | SemicolonSep , 686 , 143 , // 686 - si-lk
+ 0x1b , 0x4e2 , 0x354 , 0x272d, 0x5190, 0x8f , 1 | SemicolonSep , 688 , 688 , // 687 - sk
+ 0x41b , 0x4e2 , 0x354 , 0x272d, 0x5190, 0x8f , 1 | SemicolonSep , 688 , 688 , // 688 - sk-sk
+ 0x24 , 0x4e2 , 0x354 , 0x272d, 0x5190, 0xd4 , 1 | SemicolonSep , 690 , 690 , // 689 - sl
+ 0x424 , 0x4e2 , 0x354 , 0x272d, 0x5190, 0xd4 , 1 | SemicolonSep , 690 , 690 , // 690 - sl-si
+ 0x783b , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0xdd , 1 | SemicolonSep , 693 , 693 , // 691 - sma
+ 0x183b , 0x4e4 , 0x352 , 0x2710, 0x4f35, 0xb1 , 1 | SemicolonSep , 692 , 692 , // 692 - sma-no
+ 0x1c3b , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0xdd , 1 | SemicolonSep , 693 , 693 , // 693 - sma-se
+ 0x7c3b , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0xdd , 1 | SemicolonSep , 696 , 696 , // 694 - smj
+ 0x103b , 0x4e4 , 0x352 , 0x2710, 0x4f35, 0xb1 , 1 | SemicolonSep , 695 , 695 , // 695 - smj-no
+ 0x143b , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0xdd , 1 | SemicolonSep , 696 , 696 , // 696 - smj-se
+ 0x703b , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0x4d , 1 | SemicolonSep , 698 , 698 , // 697 - smn
+ 0x243b , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0x4d , 1 | SemicolonSep , 698 , 698 , // 698 - smn-fi
+ 0x743b , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0x4d , 1 | SemicolonSep , 700 , 700 , // 699 - sms
+ 0x203b , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0x4d , 1 | SemicolonSep , 700 , 700 , // 700 - sms-fi
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x108 , 1 | SemicolonSep , 703 , 240 , // 701 - sn
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x108 , 1 | SemicolonSep , 703 , 240 , // 702 - sn-latn
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x108 , 1 | SemicolonSep , 703 , 240 , // 703 - sn-latn-zw
+ 0x77 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd8 , 1 | SemicolonSep , 708 , 240 , // 704 - so
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x3e , 1 | SemicolonSep , 705 , 240 , // 705 - so-dj
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x49 , 1 | SemicolonSep , 706 , 240 , // 706 - so-et
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 | SemicolonSep , 707 , 240 , // 707 - so-ke
+ 0x477 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd8 , 1 | SemicolonSep , 708 , 240 , // 708 - so-so
+ 0x1c , 0x4e2 , 0x354 , 0x272d, 0x5190, 0x6 , 1 | SemicolonSep , 710 , 710 , // 709 - sq
+ 0x41c , 0x4e2 , 0x354 , 0x272d, 0x5190, 0x6 , 1 | SemicolonSep , 710 , 710 , // 710 - sq-al
+ 0x1000 , 0x4e2 , 0x354 , 0x272d, 0x5190, 0x4ca2, 1 | SemicolonSep , 711 , 240 , // 711 - sq-mk
+ 0x1000 , 0x4e2 , 0x354 , 0x272d, 0x5190, 0x974941, 1 | SemicolonSep , 712 , 240 , // 712 - sq-xk
+ 0x7c1a , 0x4e2 , 0x354 , 0x272d, 0x1f4 , 0x10f , 1 | SemicolonSep , 724 , 724 , // 713 - sr
+ 0x6c1a , 0x4e3 , 0x357 , 0x2717, 0x5221, 0x10f , 1 | SemicolonSep , 718 , 718 , // 714 - sr-cyrl
+ 0x1c1a , 0x4e3 , 0x357 , 0x2717, 0x5221, 0x19 , 1 | SemicolonSep , 715 , 715 , // 715 - sr-cyrl-ba
+ 0xc1a , 0x4e3 , 0x357 , 0x2717, 0x5221, 0x10d , 1 | SemicolonSep , 716 , 716 , // 716 - sr-cyrl-cs
+ 0x301a , 0x4e3 , 0x357 , 0x2717, 0x5221, 0x10e , 1 | SemicolonSep , 717 , 717 , // 717 - sr-cyrl-me
+ 0x281a , 0x4e3 , 0x357 , 0x2717, 0x5221, 0x10f , 1 | SemicolonSep , 718 , 718 , // 718 - sr-cyrl-rs
+ 0x1000 , 0x4e3 , 0x357 , 0x2717, 0x5221, 0x974941, 1 | SemicolonSep , 719 , 240 , // 719 - sr-cyrl-xk
+ 0x701a , 0x4e2 , 0x354 , 0x272d, 0x1f4 , 0x10f , 1 | SemicolonSep , 724 , 724 , // 720 - sr-latn
+ 0x181a , 0x4e2 , 0x354 , 0x2762, 0x366 , 0x19 , 1 | SemicolonSep , 721 , 721 , // 721 - sr-latn-ba
+ 0x81a , 0x4e2 , 0x354 , 0x272d, 0x1f4 , 0x10d , 1 | SemicolonSep , 722 , 722 , // 722 - sr-latn-cs
+ 0x2c1a , 0x4e2 , 0x354 , 0x272d, 0x1f4 , 0x10e , 1 | SemicolonSep , 723 , 723 , // 723 - sr-latn-me
+ 0x241a , 0x4e2 , 0x354 , 0x272d, 0x1f4 , 0x10f , 1 | SemicolonSep , 724 , 724 , // 724 - sr-latn-rs
+ 0x1000 , 0x4e2 , 0x354 , 0x272d, 0x1f4 , 0x974941, 1 | SemicolonSep , 725 , 240 , // 725 - sr-latn-xk
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd1 , 1 | SemicolonSep , 728 , 240 , // 726 - ss
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x104 , 1 | SemicolonSep , 727 , 240 , // 727 - ss-sz
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd1 , 1 | SemicolonSep , 728 , 240 , // 728 - ss-za
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x47 , 1 | SemicolonSep , 730 , 240 , // 729 - ssy
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x47 , 1 | SemicolonSep , 730 , 240 , // 730 - ssy-er
+ 0x30 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd1 , 1 | SemicolonSep , 733 , 240 , // 731 - st
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x92 , 1 | SemicolonSep , 732 , 240 , // 732 - st-ls
+ 0x430 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd1 , 1 | SemicolonSep , 733 , 240 , // 733 - st-za
+ 0x1d , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0xdd , 1 | SemicolonSep , 737 , 737 , // 734 - sv
+ 0x1000 , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0x9906f5, 1 | SemicolonSep , 735 , 240 , // 735 - sv-ax
+ 0x81d , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0x4d , 1 | SemicolonSep , 736 , 736 , // 736 - sv-fi
+ 0x41d , 0x4e4 , 0x352 , 0x2710, 0x4f36, 0xdd , 1 | SemicolonSep , 737 , 737 , // 737 - sv-se
+ 0x41 , 0x4e4 , 0x1b5 , 0x2710, 0x1f4 , 0x81 , 1 | SemicolonSep , 740 , 740 , // 738 - sw
+ 0x1000 , 0x4e4 , 0x1b5 , 0x2710, 0x1f4 , 0x2c , 1 | SemicolonSep , 739 , 740 , // 739 - sw-cd
+ 0x441 , 0x4e4 , 0x1b5 , 0x2710, 0x1f4 , 0x81 , 1 | SemicolonSep , 740 , 740 , // 740 - sw-ke
+ 0x1000 , 0x4e4 , 0x1b5 , 0x2710, 0x1f4 , 0xef , 1 | SemicolonSep , 741 , 240 , // 741 - sw-tz
+ 0x1000 , 0x4e4 , 0x1b5 , 0x2710, 0x1f4 , 0xf0 , 1 | SemicolonSep , 742 , 240 , // 742 - sw-ug
+ 0x1000 , 0x0 , 0x1 , 0x0 , 0x1f4 , 0x2c , 1 | CommaSep , 744 , 240 , // 743 - swc
+ 0x1000 , 0x0 , 0x1 , 0x0 , 0x1f4 , 0x2c , 1 | SemicolonSep , 744 , 240 , // 744 - swc-cd
+ 0x5a , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xde , 1 | CommaSep , 746 , 143 , // 745 - syr
+ 0x45a , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xde , 1 | CommaSep , 746 , 143 , // 746 - syr-sy
+ 0x49 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | CommaSep , 748 , 143 , // 747 - ta
+ 0x449 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | CommaSep , 748 , 143 , // 748 - ta-in
+ 0x849 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x2a , 1 | SemicolonSep , 749 , 143 , // 749 - ta-lk
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xa7 , 1 | SemicolonSep , 750 , 240 , // 750 - ta-my
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd7 , 1 | SemicolonSep , 751 , 240 , // 751 - ta-sg
+ 0x4a , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | SemicolonSep , 753 , 143 , // 752 - te
+ 0x44a , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x71 , 1 | SemicolonSep , 753 , 143 , // 753 - te-in
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf0 , 1 | SemicolonSep , 756 , 240 , // 754 - teo
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x81 , 1 | SemicolonSep , 755 , 240 , // 755 - teo-ke
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf0 , 1 | SemicolonSep , 756 , 240 , // 756 - teo-ug
+ 0x28 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0xe4 , 1 | SemicolonSep , 759 , 759 , // 757 - tg
+ 0x7c28 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0xe4 , 1 | SemicolonSep , 759 , 759 , // 758 - tg-cyrl
+ 0x428 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0xe4 , 1 | SemicolonSep , 759 , 759 , // 759 - tg-cyrl-tj
+ 0x1e , 0x36a , 0x36a , 0x2725, 0x5166, 0xe3 , 1 | CommaSep , 761 , 143 , // 760 - th
+ 0x41e , 0x36a , 0x36a , 0x2725, 0x5166, 0xe3 , 1 | CommaSep , 761 , 143 , // 761 - th-th
+ 0x73 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x47 , 1 | SemicolonSep , 763 , 143 , // 762 - ti
+ 0x873 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x47 , 1 | SemicolonSep , 763 , 143 , // 763 - ti-er
+ 0x473 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x49 , 1 | SemicolonSep , 764 , 143 , // 764 - ti-et
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x47 , 1 | SemicolonSep , 766 , 240 , // 765 - tig
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x47 , 1 | SemicolonSep , 766 , 240 , // 766 - tig-er
+ 0x42 , 0x4e2 , 0x354 , 0x272d, 0x5190, 0xee , 1 | SemicolonSep , 768 , 768 , // 767 - tk
+ 0x442 , 0x4e2 , 0x354 , 0x272d, 0x5190, 0xee , 1 | SemicolonSep , 768 , 768 , // 768 - tk-tm
+ 0x32 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd1 , 1 | SemicolonSep , 771 , 771 , // 769 - tn
+ 0x832 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0x13 , 1 | SemicolonSep , 770 , 770 , // 770 - tn-bw
+ 0x432 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd1 , 1 | SemicolonSep , 771 , 771 , // 771 - tn-za
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xe7 , 1 | SemicolonSep , 773 , 240 , // 772 - to
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xe7 , 1 | SemicolonSep , 773 , 240 , // 773 - to-to
+ 0x1f , 0x4e6 , 0x359 , 0x2761, 0x51a9, 0xeb , 1 | SemicolonSep , 776 , 776 , // 774 - tr
+ 0x1000 , 0x4e6 , 0x359 , 0x2761, 0x51a9, 0x3b , 1 | SemicolonSep , 775 , 240 , // 775 - tr-cy
+ 0x41f , 0x4e6 , 0x359 , 0x2761, 0x51a9, 0xeb , 1 | SemicolonSep , 776 , 776 , // 776 - tr-tr
+ 0x31 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd1 , 1 | SemicolonSep , 778 , 240 , // 777 - ts
+ 0x431 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd1 , 1 | SemicolonSep , 778 , 240 , // 778 - ts-za
+ 0x44 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0xcb , 1 | SemicolonSep , 780 , 780 , // 779 - tt
+ 0x444 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0xcb , 1 | SemicolonSep , 780 , 780 , // 780 - tt-ru
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xad , 1 | SemicolonSep , 782 , 240 , // 781 - twq
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xad , 1 | SemicolonSep , 782 , 240 , // 782 - twq-ne
+ 0x5f , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x4 , 1 | SemicolonSep , 787 , 787 , // 783 - tzm
+ 0x1000 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x9f , 1 | SemicolonSep , 785 , 240 , // 784 - tzm-arab
+ 0x45f , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x9f , 1 | SemicolonSep , 785 , 240 , // 785 - tzm-arab-ma
+ 0x7c5f , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x4 , 1 | SemicolonSep , 787 , 787 , // 786 - tzm-latn
+ 0x85f , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0x4 , 1 | SemicolonSep , 787 , 787 , // 787 - tzm-latn-dz
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9f , 1 | SemicolonSep , 788 , 240 , // 788 - tzm-latn-ma
+ 0x785f , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9f , 1 | SemicolonSep , 790 , 316 , // 789 - tzm-tfng
+ 0x105f , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9f , 1 | SemicolonSep , 790 , 316 , // 790 - tzm-tfng-ma
+ 0x80 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x2d , 1 | CommaSep , 792 , 143 , // 791 - ug
+ 0x480 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0x2d , 1 | CommaSep , 792 , 143 , // 792 - ug-cn
+ 0x22 , 0x4e3 , 0x362 , 0x2721, 0x1f4 , 0xf1 , 1 | SemicolonSep , 794 , 794 , // 793 - uk
+ 0x422 , 0x4e3 , 0x362 , 0x2721, 0x1f4 , 0xf1 , 1 | SemicolonSep , 794 , 794 , // 794 - uk-ua
+ 0x20 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xbe , 1 | SemicolonSep , 797 , 143 , // 795 - ur
+ 0x820 , 0x4e8 , 0x2d0 , 0x2 , 0x1f4 , 0x71 , 2 | SemicolonSep , 796 , 240 , // 796 - ur-in
+ 0x420 , 0x4e8 , 0x2d0 , 0x2714, 0x4fc4, 0xbe , 1 | SemicolonSep , 797 , 143 , // 797 - ur-pk
+ 0x43 , 0x4e6 , 0x359 , 0x272d, 0x1f4 , 0xf7 , 1 | SemicolonSep , 804 , 804 , // 798 - uz
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x3 , 2 | SemicolonSep , 800 , 240 , // 799 - uz-arab
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x3 , 2 | SemicolonSep , 800 , 240 , // 800 - uz-arab-af
+ 0x7843 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0xf7 , 1 | SemicolonSep , 802 , 802 , // 801 - uz-cyrl
+ 0x843 , 0x4e3 , 0x362 , 0x2717, 0x5190, 0xf7 , 1 | SemicolonSep , 802 , 802 , // 802 - uz-cyrl-uz
+ 0x7c43 , 0x4e6 , 0x359 , 0x272d, 0x1f4 , 0xf7 , 1 | SemicolonSep , 804 , 804 , // 803 - uz-latn
+ 0x443 , 0x4e6 , 0x359 , 0x272d, 0x1f4 , 0xf7 , 1 | SemicolonSep , 804 , 804 , // 804 - uz-latn-uz
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x8e , 1 | SemicolonSep , 809 , 240 , // 805 - vai
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x8e , 1 | SemicolonSep , 807 , 240 , // 806 - vai-latn
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x8e , 1 | SemicolonSep , 807 , 240 , // 807 - vai-latn-lr
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x8e , 1 | SemicolonSep , 809 , 240 , // 808 - vai-vaii
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x8e , 1 | SemicolonSep , 809 , 240 , // 809 - vai-vaii-lr
+ 0x33 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd1 , 1 | SemicolonSep , 811 , 240 , // 810 - ve
+ 0x433 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xd1 , 1 | SemicolonSep , 811 , 240 , // 811 - ve-za
+ 0x2a , 0x4ea , 0x4ea , 0x2710, 0x1f4 , 0xfb , 1 | CommaSep , 813 , 143 , // 812 - vi
+ 0x42a , 0x4ea , 0x4ea , 0x2710, 0x1f4 , 0xfb , 1 | CommaSep , 813 , 143 , // 813 - vi-vn
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x989e, 1 | SemicolonSep , 815 , 240 , // 814 - vo
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x989e, 1 | SemicolonSep , 815 , 240 , // 815 - vo-001
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 | SemicolonSep , 817 , 240 , // 816 - vun
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xef , 1 | SemicolonSep , 817 , 240 , // 817 - vun-tz
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xdf , 1 | SemicolonSep , 819 , 240 , // 818 - wae
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xdf , 1 | SemicolonSep , 819 , 240 , // 819 - wae-ch
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x49 , 1 | SemicolonSep , 821 , 240 , // 820 - wal
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x49 , 1 | SemicolonSep , 821 , 240 , // 821 - wal-et
+ 0x88 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xd2 , 1 | SemicolonSep , 823 , 823 , // 822 - wo
+ 0x488 , 0x4e4 , 0x352 , 0x2710, 0x4f49, 0xd2 , 1 | SemicolonSep , 823 , 823 , // 823 - wo-sn
+ 0x1007f, 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xf4 , 1 | CommaSep , -1 , -1 , // 824 - x-iv_mathan
+ 0x34 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd1 , 1 | SemicolonSep , 826 , 826 , // 825 - xh
+ 0x434 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd1 , 1 | SemicolonSep , 826 , 826 , // 826 - xh-za
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf0 , 1 | SemicolonSep , 828 , 240 , // 827 - xog
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0xf0 , 1 | SemicolonSep , 828 , 240 , // 828 - xog-ug
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 | SemicolonSep , 830 , 240 , // 829 - yav
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x31 , 1 | SemicolonSep , 830 , 240 , // 830 - yav-cm
+ 0x3d , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x989e, 1 | SemicolonSep , 832 , 240 , // 831 - yi
+ 0x43d , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x989e, 1 | SemicolonSep , 832 , 240 , // 832 - yi-001
+ 0x6a , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xaf , 1 | SemicolonSep , 835 , 835 , // 833 - yo
+ 0x1000 , 0x4e4 , 0x1b5 , 0x2710, 0x1f4 , 0x1c , 1 | SemicolonSep , 834 , 240 , // 834 - yo-bj
+ 0x46a , 0x4e4 , 0x1b5 , 0x2710, 0x25 , 0xaf , 1 | SemicolonSep , 835 , 835 , // 835 - yo-ng
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x68 , 1 | CommaSep , 837 , 240 , // 836 - yue
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x68 , 1 | CommaSep , 837 , 240 , // 837 - yue-hk
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9f , 1 | SemicolonSep , 840 , 316 , // 838 - zgh
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9f , 1 | SemicolonSep , 840 , 316 , // 839 - zgh-tfng
+ 0x1000 , 0x0 , 0x1 , 0x2 , 0x1f4 , 0x9f , 1 | SemicolonSep , 840 , 316 , // 840 - zgh-tfng-ma
+ 0x7804 , 0x3a8 , 0x3a8 , 0x2718, 0x1f4 , 0x2d , 1 | CommaSep , 844 , 844 , // 841 - zh
+ 0x4 , 0x3a8 , 0x3a8 , 0x0 , 0x1f4 , 0x2d , 1 | CommaSep , 844 , 844 , // 842 - zh-chs
+ 0x7c04 , 0x3b6 , 0x3b6 , 0x0 , 0x1f4 , 0x68 , 1 | CommaSep , 851 , 851 , // 843 - zh-cht
+ 0x804 , 0x3a8 , 0x3a8 , 0x2718, 0x1f4 , 0x2d , 1 | CommaSep , 844 , 844 , // 844 - zh-cn
+ 0x50804, 0x3a8 , 0x3a8 , 0x2718, 0x1f4 , 0x2d , 1 | CommaSep , 844 , 844 , // 845 - zh-cn_phoneb
+ 0x20804, 0x3a8 , 0x3a8 , 0x2718, 0x1f4 , 0x2d , 1 | CommaSep , 844 , 844 , // 846 - zh-cn_stroke
+ 0x4 , 0x3a8 , 0x3a8 , 0x2718, 0x1f4 , 0x2d , 1 | CommaSep , 844 , 844 , // 847 - zh-hans
+ 0x1000 , 0x3a8 , 0x3a8 , 0x2718, 0x1f4 , 0x68 , 1 | SemicolonSep , 848 , 240 , // 848 - zh-hans-hk
+ 0x1000 , 0x3a8 , 0x3a8 , 0x2718, 0x1f4 , 0x97 , 1 | SemicolonSep , 849 , 240 , // 849 - zh-hans-mo
+ 0x7c04 , 0x3b6 , 0x3b6 , 0x2712, 0x1f4 , 0x68 , 1 | CommaSep , 851 , 851 , // 850 - zh-hant
+ 0xc04 , 0x3b6 , 0x3b6 , 0x2712, 0x1f4 , 0x68 , 1 | CommaSep , 851 , 851 , // 851 - zh-hk
+ 0x40c04, 0x3b6 , 0x3b6 , 0x2712, 0x1f4 , 0x68 , 1 | CommaSep , 851 , 851 , // 852 - zh-hk_radstr
+ 0x1404 , 0x3b6 , 0x3b6 , 0x2712, 0x1f4 , 0x97 , 1 | CommaSep , 853 , 853 , // 853 - zh-mo
+ 0x41404, 0x3b6 , 0x3b6 , 0x2712, 0x1f4 , 0x97 , 1 | CommaSep , 853 , 853 , // 854 - zh-mo_radstr
+ 0x21404, 0x3b6 , 0x3b6 , 0x2712, 0x1f4 , 0x97 , 1 | CommaSep , 853 , 853 , // 855 - zh-mo_stroke
+ 0x1004 , 0x3a8 , 0x3a8 , 0x2718, 0x1f4 , 0xd7 , 1 | CommaSep , 856 , 856 , // 856 - zh-sg
+ 0x51004, 0x3a8 , 0x3a8 , 0x2718, 0x1f4 , 0xd7 , 1 | CommaSep , 856 , 856 , // 857 - zh-sg_phoneb
+ 0x21004, 0x3a8 , 0x3a8 , 0x2718, 0x1f4 , 0xd7 , 1 | CommaSep , 856 , 856 , // 858 - zh-sg_stroke
+ 0x404 , 0x3b6 , 0x3b6 , 0x2712, 0x1f4 , 0xed , 1 | CommaSep , 859 , 859 , // 859 - zh-tw
+ 0x30404, 0x3b6 , 0x3b6 , 0x2712, 0x1f4 , 0xed , 1 | CommaSep , 859 , 859 , // 860 - zh-tw_pronun
+ 0x40404, 0x3b6 , 0x3b6 , 0x2712, 0x1f4 , 0xed , 1 | CommaSep , 859 , 859 , // 861 - zh-tw_radstr
+ 0x35 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd1 , 1 | SemicolonSep , 863 , 863 , // 862 - zu
+ 0x435 , 0x4e4 , 0x352 , 0x2710, 0x1f4 , 0xd1 , 1 | SemicolonSep , 863 , 863 , // 863 - zu-za
};
// s_lcids list all supported lcids. used to binary search and we use the index of the matched lcid to
diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/TextInfo.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/TextInfo.cs
index 06d9ac7e04188..109ebde2c24dd 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Globalization/TextInfo.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/TextInfo.cs
@@ -37,7 +37,7 @@ private enum Tristate : byte
private Tristate _isAsciiCasingSameAsInvariant = Tristate.NotInitialized;
// Invariant text info
- internal static readonly TextInfo Invariant = new TextInfo(CultureData.Invariant, readOnly: true);
+ internal static readonly TextInfo Invariant = new TextInfo(CultureData.Invariant, readOnly: true) { _isAsciiCasingSameAsInvariant = Tristate.True };
internal TextInfo(CultureData cultureData)
{
diff --git a/src/libraries/System.Private.CoreLib/src/System/Guid.cs b/src/libraries/System.Private.CoreLib/src/System/Guid.cs
index b66d936a5e452..81a9910ee3370 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Guid.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Guid.cs
@@ -362,7 +362,7 @@ private static bool TryParseGuid(ReadOnlySpan guidString, ref GuidResult r
}
// Two helpers used for parsing components:
- // - uint.TryParse(..., NumberStyles.AllowHexSpecifier, ...)
+ // - Number.TryParseUInt32HexNumberStyle(..., NumberStyles.AllowHexSpecifier, ...)
// Used when we expect the entire provided span to be filled with and only with hex digits and no overflow is possible
// - TryParseHex
// Used when the component may have an optional '+' and "0x" prefix, when it may overflow, etc.
@@ -421,7 +421,7 @@ private static bool TryParseExactD(ReadOnlySpan guidString, ref GuidResult
// _f, _g must be stored as a big-endian ushort
result._fg = BitConverter.IsLittleEndian ? BinaryPrimitives.ReverseEndianness((ushort)uintTmp) : (ushort)uintTmp;
- if (uint.TryParse(guidString.Slice(28, 8), NumberStyles.AllowHexSpecifier, null, out uintTmp)) // _h, _i, _j, _k
+ if (Number.TryParseUInt32HexNumberStyle(guidString.Slice(28, 8), NumberStyles.AllowHexSpecifier, out uintTmp) == Number.ParsingStatus.OK) // _h, _i, _j, _k
{
// _h, _i, _j, _k must be stored as a big-endian uint
result._hijk = BitConverter.IsLittleEndian ? BinaryPrimitives.ReverseEndianness(uintTmp) : uintTmp;
@@ -447,20 +447,20 @@ private static bool TryParseExactN(ReadOnlySpan guidString, ref GuidResult
return false;
}
- if (uint.TryParse(guidString.Slice(0, 8), NumberStyles.AllowHexSpecifier, null, out result._a) && // _a
- uint.TryParse(guidString.Slice(8, 8), NumberStyles.AllowHexSpecifier, null, out uint uintTmp)) // _b, _c
+ if (Number.TryParseUInt32HexNumberStyle(guidString.Slice(0, 8), NumberStyles.AllowHexSpecifier, out result._a) == Number.ParsingStatus.OK && // _a
+ Number.TryParseUInt32HexNumberStyle(guidString.Slice(8, 8), NumberStyles.AllowHexSpecifier, out uint uintTmp) == Number.ParsingStatus.OK) // _b, _c
{
// _b, _c are independently in machine-endian order
if (BitConverter.IsLittleEndian) { uintTmp = BitOperations.RotateRight(uintTmp, 16); }
result._bc = uintTmp;
- if (uint.TryParse(guidString.Slice(16, 8), NumberStyles.AllowHexSpecifier, null, out uintTmp)) // _d, _e, _f, _g
+ if (Number.TryParseUInt32HexNumberStyle(guidString.Slice(16, 8), NumberStyles.AllowHexSpecifier, out uintTmp) == Number.ParsingStatus.OK) // _d, _e, _f, _g
{
// _d, _e, _f, _g must be stored as a big-endian uint
if (BitConverter.IsLittleEndian) { uintTmp = BinaryPrimitives.ReverseEndianness(uintTmp); }
result._defg = uintTmp;
- if (uint.TryParse(guidString.Slice(24, 8), NumberStyles.AllowHexSpecifier, null, out uintTmp)) // _h, _i, _j, _k
+ if (Number.TryParseUInt32HexNumberStyle(guidString.Slice(24, 8), NumberStyles.AllowHexSpecifier, out uintTmp) == Number.ParsingStatus.OK) // _h, _i, _j, _k
{
// _h, _i, _j, _k must be stored as big-endian uint
if (BitConverter.IsLittleEndian) { uintTmp = BinaryPrimitives.ReverseEndianness(uintTmp); }
diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/FileStream.Unix.cs b/src/libraries/System.Private.CoreLib/src/System/IO/FileStream.Unix.cs
index aa1f22aab1b38..38dc6d2d01174 100644
--- a/src/libraries/System.Private.CoreLib/src/System/IO/FileStream.Unix.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/IO/FileStream.Unix.cs
@@ -4,6 +4,7 @@
using Microsoft.Win32.SafeHandles;
using System.Diagnostics;
using System.Runtime.InteropServices;
+using System.Runtime.Versioning;
using System.Threading;
using System.Threading.Tasks;
@@ -333,7 +334,9 @@ private void FlushOSBuffer()
private void FlushWriteBufferForWriteByte()
{
+#pragma warning disable CA1416 // Validate platform compatibility, issue: https://github.com/dotnet/runtime/issues/44542
_asyncState?.Wait();
+#pragma warning restore CA1416
try { FlushWriteBuffer(); }
finally { _asyncState?.Release(); }
}
@@ -542,7 +545,9 @@ private unsafe int ReadNative(Span buffer)
/// Reads from the file handle into the buffer, overwriting anything in it.
private int FillReadBufferForReadByte()
{
+#pragma warning disable CA1416 // Validate platform compatibility, issue: https://github.com/dotnet/runtime/issues/44542
_asyncState?.Wait();
+#pragma warning restore CA1416
try { return ReadNative(_buffer); }
finally { _asyncState?.Release(); }
}
diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/Stream.cs b/src/libraries/System.Private.CoreLib/src/System/IO/Stream.cs
index cb6f006668192..6a364614ef99a 100644
--- a/src/libraries/System.Private.CoreLib/src/System/IO/Stream.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/IO/Stream.cs
@@ -218,7 +218,9 @@ internal IAsyncResult BeginReadInternal(
}
else
{
+#pragma warning disable CA1416 // Validate platform compatibility, issue: https://github.com/dotnet/runtime/issues/44543
semaphore.Wait();
+#pragma warning restore CA1416
}
// Create the task to asynchronously do a Read. This task serves both
@@ -373,7 +375,9 @@ internal IAsyncResult BeginWriteInternal(
}
else
{
+#pragma warning disable CA1416 // Validate platform compatibility, issue: https://github.com/dotnet/runtime/issues/44543
semaphore.Wait(); // synchronously wait here
+#pragma warning restore CA1416
}
// Create the task to asynchronously do a Write. This task serves both
diff --git a/src/libraries/System.Private.CoreLib/src/System/Number.Parsing.cs b/src/libraries/System.Private.CoreLib/src/System/Number.Parsing.cs
index 0d7133bc027e6..3abb9dfd87157 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Number.Parsing.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Number.Parsing.cs
@@ -1096,7 +1096,7 @@ internal static ParsingStatus TryParseUInt32IntegerStyle(ReadOnlySpan valu
}
/// Parses uint limited to styles that make up NumberStyles.HexNumber.
- private static ParsingStatus TryParseUInt32HexNumberStyle(ReadOnlySpan value, NumberStyles styles, out uint result)
+ internal static ParsingStatus TryParseUInt32HexNumberStyle(ReadOnlySpan value, NumberStyles styles, out uint result)
{
Debug.Assert((styles & ~NumberStyles.HexNumber) == 0, "Only handles subsets of HexNumber format");
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 c9ec1cfb7dd25..bae3bdea9ff37 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Reflection/ParameterInfo.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/ParameterInfo.cs
@@ -46,8 +46,8 @@ public virtual object[] GetCustomAttributes(Type attributeType, bool inherit)
return Array.Empty();
}
- public virtual Type[] GetOptionalCustomModifiers() => Array.Empty();
- public virtual Type[] GetRequiredCustomModifiers() => Array.Empty();
+ public virtual Type[] GetOptionalCustomModifiers() => Type.EmptyTypes;
+ public virtual Type[] GetRequiredCustomModifiers() => Type.EmptyTypes;
public virtual int MetadataToken => MetadataToken_ParamDef;
diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/PropertyInfo.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/PropertyInfo.cs
index c13ad761a0752..1208a88b6b3d8 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Reflection/PropertyInfo.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/PropertyInfo.cs
@@ -33,8 +33,8 @@ protected PropertyInfo() { }
public MethodInfo? GetSetMethod() => GetSetMethod(nonPublic: false);
public abstract MethodInfo? GetSetMethod(bool nonPublic);
- public virtual Type[] GetOptionalCustomModifiers() => Array.Empty();
- public virtual Type[] GetRequiredCustomModifiers() => Array.Empty();
+ public virtual Type[] GetOptionalCustomModifiers() => Type.EmptyTypes;
+ public virtual Type[] GetRequiredCustomModifiers() => Type.EmptyTypes;
[DebuggerHidden]
[DebuggerStepThrough]
diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/SignatureGenericParameterType.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/SignatureGenericParameterType.cs
index dcc0fa88211cf..58662a655a49e 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Reflection/SignatureGenericParameterType.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/SignatureGenericParameterType.cs
@@ -30,8 +30,8 @@ protected SignatureGenericParameterType(int position)
internal sealed override SignatureType? ElementType => null;
public sealed override int GetArrayRank() => throw new ArgumentException(SR.Argument_HasToBeArrayClass);
public sealed override Type GetGenericTypeDefinition() => throw new InvalidOperationException(SR.InvalidOperation_NotGenericType);
- public sealed override Type[] GetGenericArguments() => Array.Empty();
- public sealed override Type[] GenericTypeArguments => Array.Empty();
+ public sealed override Type[] GetGenericArguments() => Type.EmptyTypes;
+ public sealed override Type[] GenericTypeArguments => Type.EmptyTypes;
public sealed override int GenericParameterPosition => _position;
public abstract override string Name { get; }
public sealed override string? Namespace => null;
diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/SignatureHasElementType.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/SignatureHasElementType.cs
index 9c4d73d5b1890..4226d61270ad7 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Reflection/SignatureHasElementType.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/SignatureHasElementType.cs
@@ -31,8 +31,8 @@ protected SignatureHasElementType(SignatureType elementType)
internal sealed override SignatureType? ElementType => _elementType;
public abstract override int GetArrayRank();
public sealed override Type GetGenericTypeDefinition() => throw new InvalidOperationException(SR.InvalidOperation_NotGenericType);
- public sealed override Type[] GetGenericArguments() => Array.Empty();
- public sealed override Type[] GenericTypeArguments => Array.Empty();
+ public sealed override Type[] GetGenericArguments() => Type.EmptyTypes;
+ public sealed override Type[] GenericTypeArguments => Type.EmptyTypes;
public sealed override int GenericParameterPosition => throw new InvalidOperationException(SR.Arg_NotGenericParameter);
public sealed override string Name => _elementType.Name + Suffix;
public sealed override string? Namespace => _elementType.Namespace;
diff --git a/src/libraries/System.Private.CoreLib/src/System/RuntimeType.cs b/src/libraries/System.Private.CoreLib/src/System/RuntimeType.cs
index e30ad7b66a000..6bc3ddf5cc821 100644
--- a/src/libraries/System.Private.CoreLib/src/System/RuntimeType.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/RuntimeType.cs
@@ -194,23 +194,36 @@ protected override TypeCode GetTypeCodeImpl()
typeCode = TypeCode.Single; break;
case CorElementType.ELEMENT_TYPE_R8:
typeCode = TypeCode.Double; break;
+#if !CORECLR
+ case CorElementType.ELEMENT_TYPE_STRING:
+ typeCode = TypeCode.String; break;
+#endif
case CorElementType.ELEMENT_TYPE_VALUETYPE:
- if (this == Convert.ConvertTypes[(int)TypeCode.Decimal])
+ if (ReferenceEquals(this, typeof(decimal)))
typeCode = TypeCode.Decimal;
- else if (this == Convert.ConvertTypes[(int)TypeCode.DateTime])
+ else if (ReferenceEquals(this, typeof(DateTime)))
typeCode = TypeCode.DateTime;
else if (IsEnum)
- typeCode = GetTypeCode(Enum.GetUnderlyingType(this));
+ typeCode = GetTypeCode(Enum.InternalGetUnderlyingType(this));
else
typeCode = TypeCode.Object;
break;
default:
- if (this == Convert.ConvertTypes[(int)TypeCode.DBNull])
- typeCode = TypeCode.DBNull;
- else if (this == Convert.ConvertTypes[(int)TypeCode.String])
+#if CORECLR
+ // GetSignatureCorElementType returns E_T_CLASS for E_T_STRING
+ if (ReferenceEquals(this, typeof(string)))
+ {
typeCode = TypeCode.String;
- else
- typeCode = TypeCode.Object;
+ break;
+ }
+#endif
+ if (ReferenceEquals(this, typeof(DBNull)))
+ {
+ typeCode = TypeCode.DBNull;
+ break;
+ }
+
+ typeCode = TypeCode.Object;
break;
}
diff --git a/src/libraries/System.Private.CoreLib/src/System/String.Comparison.cs b/src/libraries/System.Private.CoreLib/src/System/String.Comparison.cs
index 44deea83bf005..bab6ff424b5b1 100644
--- a/src/libraries/System.Private.CoreLib/src/System/String.Comparison.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/String.Comparison.cs
@@ -1,11 +1,13 @@
// 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.Globalization;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
+using System.Text.Unicode;
using Internal.Runtime.CompilerServices;
@@ -834,42 +836,96 @@ internal unsafe int GetNonRandomizedHashCode()
}
}
- // Use this if and only if 'Denial of Service' attacks are not a concern (i.e. never used for free-form user input),
- // or are otherwise mitigated
internal unsafe int GetNonRandomizedHashCodeOrdinalIgnoreCase()
{
+ uint hash1 = (5381 << 16) + 5381;
+ uint hash2 = hash1;
+
fixed (char* src = &_firstChar)
{
Debug.Assert(src[this.Length] == '\0', "src[this.Length] == '\\0'");
- Debug.Assert(((int)src) % 4 == 0, "Managed string should start at 4 bytes boundary");
+ Debug.Assert(((int) src) % 4 == 0, "Managed string should start at 4 bytes boundary");
- uint hash1 = (5381 << 16) + 5381;
- uint hash2 = hash1;
-
- uint* ptr = (uint*)src;
+ uint* ptr = (uint*) src;
int length = this.Length;
// We "normalize to lowercase" every char by ORing with 0x0020. This casts
// a very wide net because it will change, e.g., '^' to '~'. But that should
// be ok because we expect this to be very rare in practice.
-
const uint NormalizeToLowercase = 0x0020_0020u; // valid both for big-endian and for little-endian
while (length > 2)
{
+ uint p0 = ptr[0];
+ uint p1 = ptr[1];
+ if (!Utf16Utility.AllCharsInUInt32AreAscii(p0 | p1))
+ {
+ goto NotAscii;
+ }
+
length -= 4;
// Where length is 4n-1 (e.g. 3,7,11,15,19) this additionally consumes the null terminator
- hash1 = (BitOperations.RotateLeft(hash1, 5) + hash1) ^ (ptr[0] | NormalizeToLowercase);
- hash2 = (BitOperations.RotateLeft(hash2, 5) + hash2) ^ (ptr[1] | NormalizeToLowercase);
+ hash1 = (BitOperations.RotateLeft(hash1, 5) + hash1) ^ (p0 | NormalizeToLowercase);
+ hash2 = (BitOperations.RotateLeft(hash2, 5) + hash2) ^ (p1 | NormalizeToLowercase);
ptr += 2;
}
if (length > 0)
{
+ uint p0 = ptr[0];
+ if (!Utf16Utility.AllCharsInUInt32AreAscii(p0))
+ {
+ goto NotAscii;
+ }
+
// Where length is 4n-3 (e.g. 1,5,9,13,17) this additionally consumes the null terminator
- hash2 = (BitOperations.RotateLeft(hash2, 5) + hash2) ^ (ptr[0] | NormalizeToLowercase);
+ hash2 = (BitOperations.RotateLeft(hash2, 5) + hash2) ^ (p0 | NormalizeToLowercase);
+ }
+ }
+
+ return (int)(hash1 + (hash2 * 1566083941));
+
+ NotAscii:
+ return GetNonRandomizedHashCodeOrdinalIgnoreCaseSlow(this);
+
+ static int GetNonRandomizedHashCodeOrdinalIgnoreCaseSlow(string str)
+ {
+ int length = str.Length;
+ char[]? borrowedArr = null;
+ // Important: leave an additional space for '\0'
+ Span scratch = (uint)length < 64 ?
+ stackalloc char[64] : (borrowedArr = ArrayPool.Shared.Rent(length + 1));
+
+ int charsWritten = System.Globalization.Ordinal.ToUpperOrdinal(str, scratch);
+ Debug.Assert(charsWritten == length);
+ scratch[length] = '\0';
+
+ const uint NormalizeToLowercase = 0x0020_0020u;
+ uint hash1 = (5381 << 16) + 5381;
+ uint hash2 = hash1;
+
+ // Duplicate the main loop, can be removed once JIT gets "Loop Unswitching" optimization
+ fixed (char* src = scratch)
+ {
+ uint* ptr = (uint*)src;
+ while (length > 2)
+ {
+ length -= 4;
+ hash1 = (BitOperations.RotateLeft(hash1, 5) + hash1) ^ (ptr[0] | NormalizeToLowercase);
+ hash2 = (BitOperations.RotateLeft(hash2, 5) + hash2) ^ (ptr[1] | NormalizeToLowercase);
+ ptr += 2;
+ }
+
+ if (length > 0)
+ {
+ hash2 = (BitOperations.RotateLeft(hash2, 5) + hash2) ^ (ptr[0] | NormalizeToLowercase);
+ }
}
+ if (borrowedArr != null)
+ {
+ ArrayPool.Shared.Return(borrowedArr);
+ }
return (int)(hash1 + (hash2 * 1566083941));
}
}
diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/CancellationToken.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/CancellationToken.cs
index 18d7194fbd770..196956c57331a 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Threading/CancellationToken.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Threading/CancellationToken.cs
@@ -35,12 +35,6 @@ public readonly struct CancellationToken
private readonly CancellationTokenSource? _source;
// !! warning. If more fields are added, the assumptions in CreateLinkedToken may no longer be valid
- private static readonly Action s_actionToActionObjShunt = obj =>
- {
- Debug.Assert(obj is Action, $"Expected {typeof(Action)}, got {obj}");
- ((Action)obj)();
- };
-
///
/// Returns an empty CancellationToken value.
///
@@ -136,12 +130,7 @@ public CancellationToken(bool canceled) : this(canceled ? CancellationTokenSourc
/// The instance that can
/// be used to unregister the callback.
/// is null.
- public CancellationTokenRegistration Register(Action callback) =>
- Register(
- s_actionToActionObjShunt,
- callback ?? throw new ArgumentNullException(nameof(callback)),
- useSynchronizationContext: false,
- useExecutionContext: true);
+ public CancellationTokenRegistration Register(Action callback) => Register(callback, useSynchronizationContext: false);
///
/// Registers a delegate that will be called when this
@@ -167,7 +156,7 @@ public CancellationTokenRegistration Register(Action callback) =>
/// is null.
public CancellationTokenRegistration Register(Action callback, bool useSynchronizationContext) =>
Register(
- s_actionToActionObjShunt,
+ (Action)(static obj => ((Action)obj!)()),
callback ?? throw new ArgumentNullException(nameof(callback)),
useSynchronizationContext,
useExecutionContext: true);
diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs
index adacabad646bd..91586eff5f42d 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs
@@ -24,17 +24,17 @@ namespace System.Threading
public sealed class ExecutionContext : IDisposable, ISerializable
{
- internal static readonly ExecutionContext Default = new ExecutionContext(isDefault: true);
- internal static readonly ExecutionContext DefaultFlowSuppressed = new ExecutionContext(AsyncLocalValueMap.Empty, Array.Empty(), isFlowSuppressed: true);
+ internal static readonly ExecutionContext Default = new ExecutionContext();
+ private static volatile ExecutionContext? s_defaultFlowSuppressed;
private readonly IAsyncLocalValueMap? m_localValues;
private readonly IAsyncLocal[]? m_localChangeNotifications;
private readonly bool m_isFlowSuppressed;
private readonly bool m_isDefault;
- private ExecutionContext(bool isDefault)
+ private ExecutionContext()
{
- m_isDefault = isDefault;
+ m_isDefault = true;
}
private ExecutionContext(
@@ -88,9 +88,11 @@ public void GetObjectData(SerializationInfo info, StreamingContext context)
if (m_localValues == null || AsyncLocalValueMap.IsEmpty(m_localValues))
{
+#pragma warning disable CA1825 // Avoid unnecessary zero-length array allocations
return isFlowSuppressed ?
- DefaultFlowSuppressed :
+ (s_defaultFlowSuppressed ??= new ExecutionContext(AsyncLocalValueMap.Empty, new IAsyncLocal[0], isFlowSuppressed: true)) :
null; // implies the default context
+#pragma warning restore CA1825
}
return new ExecutionContext(m_localValues, m_localChangeNotifications, isFlowSuppressed);
diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/ManualResetEventSlim.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/ManualResetEventSlim.cs
index 9af60a64ff757..4f88b6670e270 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Threading/ManualResetEventSlim.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Threading/ManualResetEventSlim.cs
@@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System.Diagnostics;
+using System.Runtime.Versioning;
namespace System.Threading
{
@@ -357,6 +358,7 @@ public void Reset()
/// The caller of this method blocks indefinitely until the current instance is set. The caller will
/// return immediately if the event is currently in a set state.
///
+ [UnsupportedOSPlatform("browser")]
public void Wait()
{
Wait(Timeout.Infinite, CancellationToken.None);
@@ -377,6 +379,7 @@ public void Wait()
/// The caller of this method blocks indefinitely until the current instance is set. The caller will
/// return immediately if the event is currently in a set state.
///
+ [UnsupportedOSPlatform("browser")]
public void Wait(CancellationToken cancellationToken)
{
Wait(Timeout.Infinite, cancellationToken);
@@ -397,6 +400,7 @@ public void Wait(CancellationToken cancellationToken)
///
/// The maximum number of waiters has been exceeded.
///
+ [UnsupportedOSPlatform("browser")]
public bool Wait(TimeSpan timeout)
{
long totalMilliseconds = (long)timeout.TotalMilliseconds;
@@ -428,6 +432,7 @@ public bool Wait(TimeSpan timeout)
///
/// The maximum number of waiters has been exceeded.
///
+ [UnsupportedOSPlatform("browser")]
public bool Wait(TimeSpan timeout, CancellationToken cancellationToken)
{
long totalMilliseconds = (long)timeout.TotalMilliseconds;
@@ -452,6 +457,7 @@ public bool Wait(TimeSpan timeout, CancellationToken cancellationToken)
///
/// The maximum number of waiters has been exceeded.
///
+ [UnsupportedOSPlatform("browser")]
public bool Wait(int millisecondsTimeout)
{
return Wait(millisecondsTimeout, CancellationToken.None);
@@ -475,6 +481,7 @@ public bool Wait(int millisecondsTimeout)
///
/// was canceled.
+ [UnsupportedOSPlatform("browser")]
public bool Wait(int millisecondsTimeout, CancellationToken cancellationToken)
{
ThrowIfDisposed();
diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/SemaphoreSlim.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/SemaphoreSlim.cs
index 4e9438112fba6..dd573007ce215 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Threading/SemaphoreSlim.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Threading/SemaphoreSlim.cs
@@ -3,6 +3,7 @@
using System.Diagnostics;
using System.Runtime.CompilerServices;
+using System.Runtime.Versioning;
using System.Threading.Tasks;
namespace System.Threading
@@ -172,6 +173,7 @@ public SemaphoreSlim(int initialCount, int maxCount)
///
/// The current instance has already been
/// disposed.
+ [UnsupportedOSPlatform("browser")]
public void Wait()
{
// Call wait with infinite timeout
@@ -188,6 +190,7 @@ public void Wait()
/// canceled.
/// The current instance has already been
/// disposed.
+ [UnsupportedOSPlatform("browser")]
public void Wait(CancellationToken cancellationToken)
{
// Call wait with infinite timeout
@@ -206,6 +209,7 @@ public void Wait(CancellationToken cancellationToken)
/// is a negative
/// number other than -1 milliseconds, which represents an infinite time-out -or- timeout is greater
/// than .
+ [UnsupportedOSPlatform("browser")]
public bool Wait(TimeSpan timeout)
{
// Validate the timeout
@@ -236,6 +240,7 @@ public bool Wait(TimeSpan timeout)
/// number other than -1 milliseconds, which represents an infinite time-out -or- timeout is greater
/// than .
/// was canceled.
+ [UnsupportedOSPlatform("browser")]
public bool Wait(TimeSpan timeout, CancellationToken cancellationToken)
{
// Validate the timeout
@@ -260,6 +265,7 @@ public bool Wait(TimeSpan timeout, CancellationToken cancellationToken)
/// otherwise, false.
/// is a
/// negative number other than -1, which represents an infinite time-out.
+ [UnsupportedOSPlatform("browser")]
public bool Wait(int millisecondsTimeout)
{
return Wait(millisecondsTimeout, CancellationToken.None);
@@ -277,6 +283,7 @@ public bool Wait(int millisecondsTimeout)
/// is a negative number other than -1,
/// which represents an infinite time-out.
/// was canceled.
+ [UnsupportedOSPlatform("browser")]
public bool Wait(int millisecondsTimeout, CancellationToken cancellationToken)
{
CheckDispose();
@@ -432,6 +439,7 @@ public bool Wait(int millisecondsTimeout, CancellationToken cancellationToken)
/// The start ticks to calculate the elapsed time
/// The CancellationToken to observe.
/// true if the monitor received a signal, false if the timeout expired
+ [UnsupportedOSPlatform("browser")]
private bool WaitUntilCountOrTimeout(int millisecondsTimeout, uint startTime, CancellationToken cancellationToken)
{
int remainingWaitMilliseconds = Timeout.Infinite;
diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs
index e354b58dc7af0..a8d80715ed3fe 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs
@@ -226,14 +226,15 @@ private void CompleteTaskAsync()
/// The faulted worker task that's initiating the shutdown.
private void FaultWithTask(Task faultedTask)
{
- Debug.Assert(faultedTask != null && faultedTask.IsFaulted && faultedTask.Exception!.InnerExceptions.Count > 0,
+ Debug.Assert(faultedTask != null && faultedTask.IsFaulted && faultedTask.Exception!.InnerExceptionCount > 0,
"Needs a task in the faulted state and thus with exceptions.");
ContractAssertMonitorStatus(ValueLock, held: true);
+ AggregateException faultedException = faultedTask.Exception;
// Store the faulted task's exceptions
CompletionState cs = EnsureCompletionStateInitialized();
- cs.m_exceptions ??= new List();
- cs.m_exceptions.AddRange(faultedTask.Exception.InnerExceptions);
+ cs.m_exceptions ??= new List(faultedException.InnerExceptionCount);
+ cs.m_exceptions.AddRange(faultedException.InternalInnerExceptions);
// Now that we're doomed, request completion
RequestCompletion();
diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs
index 2dff5a0ce62dd..b51a51269f8d9 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs
@@ -61,7 +61,7 @@ public class Task : Task
/// A cached task for default(TResult).
internal static readonly Task s_defaultResultTask = TaskCache.CreateCacheableTask(default);
- private static readonly TaskFactory s_Factory = new TaskFactory();
+ private static TaskFactory? s_Factory;
// The value itself, if set.
internal TResult? m_result;
@@ -486,7 +486,10 @@ internal TResult GetResultCore(bool waitCompletionNotification)
/// of , as would result from using
/// the default constructor on the factory type.
///
- public static new TaskFactory Factory => s_Factory;
+ public static new TaskFactory Factory =>
+ Volatile.Read(ref s_Factory) ??
+ Interlocked.CompareExchange(ref s_Factory, new TaskFactory(), null) ??
+ s_Factory;
///
/// Evaluates the value selector of the Task which is passed in as an object and stores the result.
diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/FutureFactory.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/FutureFactory.cs
index b2ca3898176ce..0e9090a0c62fa 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/FutureFactory.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/FutureFactory.cs
@@ -677,6 +677,7 @@ internal static Task FromAsyncImpl(
}
else
{
+#pragma warning disable CA1416 // Validate platform compatibility, issue: https://github.com/dotnet/runtime/issues/44544
ThreadPool.RegisterWaitForSingleObject(
asyncResult.AsyncWaitHandle,
delegate
@@ -687,6 +688,7 @@ internal static Task FromAsyncImpl(
null,
Timeout.Infinite,
true);
+#pragma warning restore CA1416
}
return promise;
diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs
index 201e316875784..7e2fb0f4013eb 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs
@@ -15,6 +15,7 @@
using System.Diagnostics.Tracing;
using System.Runtime.CompilerServices;
using System.Runtime.ExceptionServices;
+using System.Runtime.Versioning;
using Internal.Runtime.CompilerServices;
namespace System.Threading.Tasks
@@ -2854,6 +2855,7 @@ private bool SpinThenBlockingWait(int millisecondsTimeout, CancellationToken can
try
{
AddCompletionAction(mres, addBeforeOthers: true);
+#pragma warning disable CA1416 // Validate platform compatibility, issue: https://github.com/dotnet/runtime/issues/44622
if (infiniteWait)
{
returnValue = mres.Wait(Timeout.Infinite, cancellationToken);
@@ -2866,6 +2868,7 @@ private bool SpinThenBlockingWait(int millisecondsTimeout, CancellationToken can
returnValue = mres.Wait((int)(millisecondsTimeout - elapsedTimeTicks), cancellationToken);
}
}
+#pragma warning restore CA1416
}
finally
{
@@ -4447,6 +4450,7 @@ internal void RemoveContinuation(object continuationObject) // could be TaskCont
/// At least one of the instances was canceled -or- an exception was thrown during
/// the execution of at least one of the instances.
///
+ [UnsupportedOSPlatform("browser")]
[MethodImpl(MethodImplOptions.NoOptimization)] // this is needed for the parallel debugger
public static void WaitAll(params Task[] tasks)
{
@@ -4489,6 +4493,7 @@ public static void WaitAll(params Task[] tasks)
/// infinite time-out -or- timeout is greater than
/// .
///
+ [UnsupportedOSPlatform("browser")]
[MethodImpl(MethodImplOptions.NoOptimization)] // this is needed for the parallel debugger
public static bool WaitAll(Task[] tasks, TimeSpan timeout)
{
@@ -4527,6 +4532,7 @@ public static bool WaitAll(Task[] tasks, TimeSpan timeout)
/// is a negative number other than -1, which represents an
/// infinite time-out.
///
+ [UnsupportedOSPlatform("browser")]
[MethodImpl(MethodImplOptions.NoOptimization)] // this is needed for the parallel debugger
public static bool WaitAll(Task[] tasks, int millisecondsTimeout)
{
@@ -4555,6 +4561,7 @@ public static bool WaitAll(Task[] tasks, int millisecondsTimeout)
///
/// The was canceled.
///
+ [UnsupportedOSPlatform("browser")]
[MethodImpl(MethodImplOptions.NoOptimization)] // this is needed for the parallel debugger
public static void WaitAll(Task[] tasks, CancellationToken cancellationToken)
{
@@ -4595,12 +4602,14 @@ public static void WaitAll(Task[] tasks, CancellationToken cancellationToken)
///
/// The was canceled.
///
+ [UnsupportedOSPlatform("browser")]
[MethodImpl(MethodImplOptions.NoOptimization)] // this is needed for the parallel debugger
public static bool WaitAll(Task[] tasks, int millisecondsTimeout, CancellationToken cancellationToken) =>
WaitAllCore(tasks, millisecondsTimeout, cancellationToken);
// Separated out to allow it to be optimized (caller is marked NoOptimization for VS parallel debugger
// to be able to see the method on the stack and inspect arguments).
+ [UnsupportedOSPlatform("browser")]
private static bool WaitAllCore(Task[] tasks, int millisecondsTimeout, CancellationToken cancellationToken)
{
if (tasks == null)
@@ -4739,6 +4748,7 @@ private static void AddToList(T item, ref List? list, int initSize)
/// The timeout.
/// The cancellation token.
/// true if all of the tasks completed; otherwise, false.
+ [UnsupportedOSPlatform("browser")]
private static bool WaitAllBlockingCore(List tasks, int millisecondsTimeout, CancellationToken cancellationToken)
{
Debug.Assert(tasks != null, "Expected a non-null list of tasks");
@@ -4816,8 +4826,8 @@ internal static void AddExceptionsForCompletedTask(ref List? exceptio
// this will make sure it won't throw again in the implicit wait
t.UpdateExceptionObservedStatus();
- exceptions ??= new List(ex.InnerExceptions.Count);
- exceptions.AddRange(ex.InnerExceptions);
+ exceptions ??= new List(ex.InnerExceptionCount);
+ exceptions.AddRange(ex.InternalInnerExceptions);
}
}
diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/ThreadPoolTaskScheduler.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/ThreadPoolTaskScheduler.cs
index d6b85c5035711..dbe39bf4e71fb 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/ThreadPoolTaskScheduler.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/ThreadPoolTaskScheduler.cs
@@ -47,7 +47,9 @@ protected internal override void QueueTask(Task task)
// Run LongRunning tasks on their own dedicated thread.
Thread thread = new Thread(s_longRunningThreadWork);
thread.IsBackground = true; // Keep this thread from blocking process shutdown
+#if !TARGET_BROWSER
thread.Start(task);
+#endif
}
else
{
diff --git a/src/libraries/System.Private.CoreLib/src/System/Type.cs b/src/libraries/System.Private.CoreLib/src/System/Type.cs
index b25a7a0e6e319..9f6d3cbe595ba 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Type.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Type.cs
@@ -60,7 +60,7 @@ protected Type() { }
public virtual int GetArrayRank() => throw new NotSupportedException(SR.NotSupported_SubclassOverride);
public virtual Type GetGenericTypeDefinition() => throw new NotSupportedException(SR.NotSupported_SubclassOverride);
- public virtual Type[] GenericTypeArguments => (IsGenericType && !IsGenericTypeDefinition) ? GetGenericArguments() : Array.Empty();
+ public virtual Type[] GenericTypeArguments => (IsGenericType && !IsGenericTypeDefinition) ? GetGenericArguments() : Type.EmptyTypes;
public virtual Type[] GetGenericArguments() => throw new NotSupportedException(SR.NotSupported_SubclassOverride);
public virtual int GenericParameterPosition => throw new InvalidOperationException(SR.Arg_NotGenericParameter);
@@ -424,15 +424,14 @@ public static Type[] GetTypeArray(object[] args)
public static TypeCode GetTypeCode(Type? type)
{
- if (type == null)
- return TypeCode.Empty;
- return type.GetTypeCodeImpl();
+ return type?.GetTypeCodeImpl() ?? TypeCode.Empty;
}
+
protected virtual TypeCode GetTypeCodeImpl()
{
Type systemType = UnderlyingSystemType;
- if (this != systemType && systemType != null)
- return Type.GetTypeCode(systemType);
+ if (!ReferenceEquals(this, systemType) && systemType is not null)
+ return GetTypeCode(systemType);
return TypeCode.Object;
}
diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ClassDataContract.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ClassDataContract.cs
index db5869fde713e..36f35e3177d8d 100644
--- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ClassDataContract.cs
+++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ClassDataContract.cs
@@ -388,7 +388,7 @@ internal static bool IsNonAttributedTypeValidForSerialization(Type type)
else
{
return (type.IsVisible &&
- type.GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public, Array.Empty()) != null);
+ type.GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public, Type.EmptyTypes) != null);
}
}
@@ -1425,7 +1425,7 @@ internal MethodInfo? GetKeyValuePairMethodInfo
if (type.IsValueType)
return null;
- ConstructorInfo? ctor = type.GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public, Array.Empty());
+ ConstructorInfo? ctor = type.GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public, Type.EmptyTypes);
if (ctor == null)
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.Format(SR.NonAttributedSerializableTypesMustHaveDefaultConstructor, DataContract.GetClrTypeFullName(type))));
diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/CodeGenerator.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/CodeGenerator.cs
index 132a76b6da6a2..3362c7a7bf550 100644
--- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/CodeGenerator.cs
+++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/CodeGenerator.cs
@@ -66,7 +66,7 @@ private static MethodInfo ObjectToString
{
if (s_objectToString == null)
{
- s_objectToString = typeof(object).GetMethod("ToString", Array.Empty());
+ s_objectToString = typeof(object).GetMethod("ToString", Type.EmptyTypes);
Debug.Assert(s_objectToString != null);
}
return s_objectToString;
diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/CollectionDataContract.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/CollectionDataContract.cs
index 55945694336f5..66e671cfaeb6c 100644
--- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/CollectionDataContract.cs
+++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/CollectionDataContract.cs
@@ -883,7 +883,7 @@ internal Type GetCollectionElementType()
enumeratorType = GetEnumeratorMethod.ReturnType;
}
- MethodInfo? getCurrentMethod = enumeratorType.GetMethod(Globals.GetCurrentMethodName, BindingFlags.Instance | BindingFlags.Public, Array.Empty());
+ MethodInfo? getCurrentMethod = enumeratorType.GetMethod(Globals.GetCurrentMethodName, BindingFlags.Instance | BindingFlags.Public, Type.EmptyTypes);
if (getCurrentMethod == null)
{
if (enumeratorType.IsInterface)
@@ -1145,7 +1145,7 @@ private static bool IsCollectionOrTryCreate(Type type, bool tryCreate, out DataC
ConstructorInfo? defaultCtor = null;
if (!type.IsValueType)
{
- defaultCtor = type.GetConstructor(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, Array.Empty());
+ defaultCtor = type.GetConstructor(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, Type.EmptyTypes);
if (defaultCtor == null && constructorRequired)
{
// All collection types could be considered read-only collections except collection types that are marked [Serializable].
@@ -1364,7 +1364,7 @@ private static void GetCollectionMethods(Type type, Type interfaceType, Type[] a
if (getEnumeratorMethod == null)
{
- getEnumeratorMethod = type.GetMethod(Globals.GetEnumeratorMethodName, BindingFlags.Instance | BindingFlags.Public, Array.Empty());
+ getEnumeratorMethod = type.GetMethod(Globals.GetEnumeratorMethodName, BindingFlags.Instance | BindingFlags.Public, Type.EmptyTypes);
if (getEnumeratorMethod == null || !Globals.TypeOfIEnumerator.IsAssignableFrom(getEnumeratorMethod.ReturnType))
{
Type? ienumerableInterface = interfaceType.GetInterfaces().Where(t => t.FullName!.StartsWith("System.Collections.Generic.IEnumerable")).FirstOrDefault();
diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContract.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContract.cs
index 8e1f6bc4f1d0a..008658e6aad03 100644
--- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContract.cs
+++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContract.cs
@@ -1979,7 +1979,7 @@ private static void ImportKnownTypeAttributes(Type? type, Dictionary
if (methodName.Length == 0)
DataContract.ThrowInvalidDataContractException(SR.Format(SR.KnownTypeAttributeEmptyString, DataContract.GetClrTypeFullName(type)), type);
- MethodInfo? method = type.GetMethod(methodName, BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public, Array.Empty());
+ MethodInfo? method = type.GetMethod(methodName, BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public, Type.EmptyTypes);
if (method == null)
DataContract.ThrowInvalidDataContractException(SR.Format(SR.KnownTypeAttributeUnknownMethod, methodName, DataContract.GetClrTypeFullName(type)), type);
diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContractSerializer.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContractSerializer.cs
index 53a1840c9cdc1..30ae159058ff2 100644
--- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContractSerializer.cs
+++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContractSerializer.cs
@@ -162,7 +162,7 @@ public ReadOnlyCollection KnownTypes
}
else
{
- _knownTypeCollection = new ReadOnlyCollection(Array.Empty());
+ _knownTypeCollection = new ReadOnlyCollection(Type.EmptyTypes);
}
}
return _knownTypeCollection;
diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/DataContractJsonSerializer.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/DataContractJsonSerializer.cs
index 604040e59e8db..ebf49e42ac6eb 100644
--- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/DataContractJsonSerializer.cs
+++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/DataContractJsonSerializer.cs
@@ -92,7 +92,7 @@ public ReadOnlyCollection KnownTypes
}
else
{
- _knownTypeCollection = new ReadOnlyCollection(Array.Empty());
+ _knownTypeCollection = new ReadOnlyCollection(Type.EmptyTypes);
}
}
return _knownTypeCollection;
@@ -547,7 +547,7 @@ public ReadOnlyCollection KnownTypes
}
else
{
- _knownTypeCollection = new ReadOnlyCollection(Array.Empty());
+ _knownTypeCollection = new ReadOnlyCollection(Type.EmptyTypes);
}
}
return _knownTypeCollection;
diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonFormatGeneratorStatics.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonFormatGeneratorStatics.cs
index 6020b107db6b9..ea6c9f016b29b 100644
--- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonFormatGeneratorStatics.cs
+++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonFormatGeneratorStatics.cs
@@ -96,7 +96,7 @@ public static PropertyInfo CollectionItemNameProperty
public static ConstructorInfo ExtensionDataObjectCtor => s_extensionDataObjectCtor ??
(s_extensionDataObjectCtor =
- typeof(ExtensionDataObject).GetConstructor(Globals.ScanAllMembers, Array.Empty()))!;
+ typeof(ExtensionDataObject).GetConstructor(Globals.ScanAllMembers, Type.EmptyTypes))!;
public static PropertyInfo ExtensionDataProperty => s_extensionDataProperty ??
(s_extensionDataProperty = typeof(IExtensibleDataObject).GetProperty("ExtensionData")!);
@@ -180,7 +180,7 @@ public static MethodInfo IsStartElementMethod0
{
if (s_isStartElementMethod0 == null)
{
- s_isStartElementMethod0 = typeof(XmlReaderDelegator).GetMethod("IsStartElement", Globals.ScanAllMembers, Array.Empty());
+ s_isStartElementMethod0 = typeof(XmlReaderDelegator).GetMethod("IsStartElement", Globals.ScanAllMembers, Type.EmptyTypes);
Debug.Assert(s_isStartElementMethod0 != null);
}
return s_isStartElementMethod0;
@@ -383,7 +383,7 @@ public static MethodInfo WriteEndElementMethod
{
if (s_writeEndElementMethod == null)
{
- s_writeEndElementMethod = typeof(XmlWriterDelegator).GetMethod("WriteEndElement", Globals.ScanAllMembers, Array.Empty());
+ s_writeEndElementMethod = typeof(XmlWriterDelegator).GetMethod("WriteEndElement", Globals.ScanAllMembers, Type.EmptyTypes);
Debug.Assert(s_writeEndElementMethod != null);
}
return s_writeEndElementMethod;
diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonFormatReaderGenerator.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonFormatReaderGenerator.cs
index 79bfe7bbf9a39..47bd84821c9e3 100644
--- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonFormatReaderGenerator.cs
+++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonFormatReaderGenerator.cs
@@ -573,11 +573,11 @@ private void ReadCollection(CollectionDataContract collectionContract)
{
case CollectionKind.GenericDictionary:
type = Globals.TypeOfDictionaryGeneric.MakeGenericType(itemType.GetGenericArguments());
- constructor = type.GetConstructor(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, Array.Empty())!;
+ constructor = type.GetConstructor(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, Type.EmptyTypes)!;
break;
case CollectionKind.Dictionary:
type = Globals.TypeOfHashtable;
- constructor = type.GetConstructor(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, Array.Empty())!;
+ constructor = type.GetConstructor(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, Type.EmptyTypes)!;
break;
case CollectionKind.Collection:
case CollectionKind.GenericCollection:
diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonFormatWriterGenerator.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonFormatWriterGenerator.cs
index c219893b3d78a..5248b9420c304 100644
--- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonFormatWriterGenerator.cs
+++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonFormatWriterGenerator.cs
@@ -346,8 +346,8 @@ private void WriteCollection(CollectionDataContract collectionContract)
{
enumeratorType = collectionContract.GetEnumeratorMethod.ReturnType;
}
- MethodInfo? moveNextMethod = enumeratorType.GetMethod(Globals.MoveNextMethodName, BindingFlags.Instance | BindingFlags.Public, Array.Empty());
- MethodInfo? getCurrentMethod = enumeratorType.GetMethod(Globals.GetCurrentMethodName, BindingFlags.Instance | BindingFlags.Public, Array.Empty());
+ MethodInfo? moveNextMethod = enumeratorType.GetMethod(Globals.MoveNextMethodName, BindingFlags.Instance | BindingFlags.Public, Type.EmptyTypes);
+ MethodInfo? getCurrentMethod = enumeratorType.GetMethod(Globals.GetCurrentMethodName, BindingFlags.Instance | BindingFlags.Public, Type.EmptyTypes);
if (moveNextMethod == null || getCurrentMethod == null)
{
if (enumeratorType.IsInterface)
diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ReflectionClassWriter.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ReflectionClassWriter.cs
index 6253555eadd3c..4b0f10bd2cfc0 100644
--- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ReflectionClassWriter.cs
+++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ReflectionClassWriter.cs
@@ -66,7 +66,7 @@ public void ReflectionWriteValue(XmlWriterDelegator xmlWriter, XmlObjectSerializ
}
else
{
- MethodInfo getValue = memberType.GetMethod("get_Value", Array.Empty())!;
+ MethodInfo getValue = memberType.GetMethod("get_Value", Type.EmptyTypes)!;
memberValue = getValue.Invoke(memberValue, Array.Empty())!;
memberType = memberValue.GetType();
}
diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ReflectionReader.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ReflectionReader.cs
index f1392a84328f5..2b7103688045c 100644
--- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ReflectionReader.cs
+++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ReflectionReader.cs
@@ -441,7 +441,7 @@ private object ReflectionCreateCollection(CollectionDataContract collectionContr
else if (collectionContract.Kind == CollectionKind.GenericDictionary && collectionContract.UnderlyingType.IsInterface)
{
Type type = Globals.TypeOfDictionaryGeneric.MakeGenericType(collectionContract.ItemType.GetGenericArguments());
- ConstructorInfo ci = type.GetConstructor(BindingFlags.Instance | BindingFlags.Public, Array.Empty())!;
+ ConstructorInfo ci = type.GetConstructor(BindingFlags.Instance | BindingFlags.Public, Type.EmptyTypes)!;
object newGenericDict = ci.Invoke(Array.Empty());
return newGenericDict;
}
diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlDataContract.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlDataContract.cs
index 703fa385cb57b..c8974ea1975f9 100644
--- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlDataContract.cs
+++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlDataContract.cs
@@ -241,7 +241,7 @@ internal CreateXmlSerializableDelegate? CreateXmlSerializableDelegate
if (type.IsValueType)
return null;
- ConstructorInfo? ctor = type.GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public, Array.Empty());
+ ConstructorInfo? ctor = type.GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public, Type.EmptyTypes);
if (ctor == null)
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.Format(SR.IXmlSerializableMustHaveDefaultConstructor, DataContract.GetClrTypeFullName(type))));
diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlFormatGeneratorStatics.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlFormatGeneratorStatics.cs
index 4867266a5408b..654ab81627bce 100644
--- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlFormatGeneratorStatics.cs
+++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlFormatGeneratorStatics.cs
@@ -45,7 +45,7 @@ internal static MethodInfo WriteEndElementMethod
{
if (s_writeEndElementMethod == null)
{
- s_writeEndElementMethod = typeof(XmlWriterDelegator).GetMethod("WriteEndElement", Globals.ScanAllMembers, Array.Empty());
+ s_writeEndElementMethod = typeof(XmlWriterDelegator).GetMethod("WriteEndElement", Globals.ScanAllMembers, Type.EmptyTypes);
Debug.Assert(s_writeEndElementMethod != null);
}
return s_writeEndElementMethod;
@@ -147,7 +147,7 @@ internal static MethodInfo IsStartElementMethod0
{
if (s_isStartElementMethod0 == null)
{
- s_isStartElementMethod0 = typeof(XmlReaderDelegator).GetMethod("IsStartElement", Globals.ScanAllMembers, Array.Empty());
+ s_isStartElementMethod0 = typeof(XmlReaderDelegator).GetMethod("IsStartElement", Globals.ScanAllMembers, Type.EmptyTypes);
Debug.Assert(s_isStartElementMethod0 != null);
}
return s_isStartElementMethod0;
@@ -199,7 +199,7 @@ internal static PropertyInfo NodeTypeProperty
private static ConstructorInfo? s_extensionDataObjectCtor;
internal static ConstructorInfo ExtensionDataObjectCtor => s_extensionDataObjectCtor ??
(s_extensionDataObjectCtor =
- typeof(ExtensionDataObject).GetConstructor(Globals.ScanAllMembers, Array.Empty())!);
+ typeof(ExtensionDataObject).GetConstructor(Globals.ScanAllMembers, Type.EmptyTypes)!);
private static ConstructorInfo? s_hashtableCtor;
internal static ConstructorInfo HashtableCtor
@@ -208,7 +208,7 @@ internal static ConstructorInfo HashtableCtor
{
if (s_hashtableCtor == null)
{
- s_hashtableCtor = Globals.TypeOfHashtable.GetConstructor(Globals.ScanAllMembers, Array.Empty());
+ s_hashtableCtor = Globals.TypeOfHashtable.GetConstructor(Globals.ScanAllMembers, Type.EmptyTypes);
Debug.Assert(s_hashtableCtor != null);
}
return s_hashtableCtor;
@@ -264,7 +264,7 @@ internal static MethodInfo ResetCollectionMemberInfoMethod
{
if (s_resetCollectionMemberInfoMethod == null)
{
- s_resetCollectionMemberInfoMethod = typeof(XmlObjectSerializerReadContext).GetMethod("ResetCollectionMemberInfo", Globals.ScanAllMembers, Array.Empty());
+ s_resetCollectionMemberInfoMethod = typeof(XmlObjectSerializerReadContext).GetMethod("ResetCollectionMemberInfo", Globals.ScanAllMembers, Type.EmptyTypes);
Debug.Assert(s_resetCollectionMemberInfoMethod != null);
}
return s_resetCollectionMemberInfoMethod;
diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlFormatReaderGenerator.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlFormatReaderGenerator.cs
index 095cd8278ce7d..9c5d3cf710598 100644
--- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlFormatReaderGenerator.cs
+++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlFormatReaderGenerator.cs
@@ -596,7 +596,7 @@ private void ReadCollection(CollectionDataContract collectionContract)
{
case CollectionKind.GenericDictionary:
type = Globals.TypeOfDictionaryGeneric.MakeGenericType(itemType.GetGenericArguments());
- constructor = type.GetConstructor(BindingFlags.Instance | BindingFlags.Public, Array.Empty())!;
+ constructor = type.GetConstructor(BindingFlags.Instance | BindingFlags.Public, Type.EmptyTypes)!;
break;
case CollectionKind.Dictionary:
type = Globals.TypeOfHashtable;
diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlFormatWriterGenerator.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlFormatWriterGenerator.cs
index ee7dbdba7a059..0dc6946c5029a 100644
--- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlFormatWriterGenerator.cs
+++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlFormatWriterGenerator.cs
@@ -409,8 +409,8 @@ private void WriteCollection(CollectionDataContract collectionContract)
{
enumeratorType = collectionContract.GetEnumeratorMethod.ReturnType;
}
- MethodInfo? moveNextMethod = enumeratorType.GetMethod(Globals.MoveNextMethodName, BindingFlags.Instance | BindingFlags.Public, Array.Empty());
- MethodInfo? getCurrentMethod = enumeratorType.GetMethod(Globals.GetCurrentMethodName, BindingFlags.Instance | BindingFlags.Public, Array.Empty());
+ MethodInfo? moveNextMethod = enumeratorType.GetMethod(Globals.MoveNextMethodName, BindingFlags.Instance | BindingFlags.Public, Type.EmptyTypes);
+ MethodInfo? getCurrentMethod = enumeratorType.GetMethod(Globals.GetCurrentMethodName, BindingFlags.Instance | BindingFlags.Public, Type.EmptyTypes);
if (moveNextMethod == null || getCurrentMethod == null)
{
if (enumeratorType.IsInterface)
diff --git a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XDocumentType.cs b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XDocumentType.cs
index 8bf4c83aa3f15..f9605ca14eddf 100644
--- a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XDocumentType.cs
+++ b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XDocumentType.cs
@@ -15,7 +15,7 @@ public class XDocumentType : XNode
private string _name;
private string? _publicId;
private string? _systemId;
- private string _internalSubset;
+ private string? _internalSubset;
///
/// Initializes an empty instance of the class.
@@ -25,7 +25,7 @@ public XDocumentType(string name, string? publicId, string? systemId, string? in
_name = XmlConvert.VerifyName(name);
_publicId = publicId;
_systemId = systemId;
- _internalSubset = internalSubset ?? string.Empty;
+ _internalSubset = internalSubset;
}
///
@@ -54,8 +54,7 @@ internal XDocumentType(XmlReader r)
///
/// Gets or sets the internal subset for this Document Type Definition (DTD).
///
- [AllowNull]
- public string InternalSubset
+ public string? InternalSubset
{
get
{
@@ -64,7 +63,7 @@ public string InternalSubset
set
{
bool notify = NotifyChanging(this, XObjectChangeEventArgs.Value);
- _internalSubset = value ?? string.Empty;
+ _internalSubset = value;
if (notify) NotifyChanged(this, XObjectChangeEventArgs.Value);
}
}
@@ -182,7 +181,7 @@ internal override int GetDeepHashCode()
return _name.GetHashCode() ^
(_publicId != null ? _publicId.GetHashCode() : 0) ^
(_systemId != null ? _systemId.GetHashCode() : 0) ^
- _internalSubset.GetHashCode();
+ (_internalSubset != null ? _internalSubset.GetHashCode() : 0);
}
}
}
diff --git a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XNodeReader.cs b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XNodeReader.cs
index b1a4e58c1dbf7..05bf4a0612fb5 100644
--- a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XNodeReader.cs
+++ b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XNodeReader.cs
@@ -378,7 +378,7 @@ public override string Value
case XmlNodeType.ProcessingInstruction:
return ((XProcessingInstruction)o).Data;
case XmlNodeType.DocumentType:
- return ((XDocumentType)o).InternalSubset;
+ return ((XDocumentType)o).InternalSubset ?? string.Empty;
default:
return string.Empty;
}
diff --git a/src/libraries/System.Private.Xml.Linq/tests/Properties/FunctionalTests.cs b/src/libraries/System.Private.Xml.Linq/tests/Properties/FunctionalTests.cs
index 5fdf219575e81..599ed303e23bb 100644
--- a/src/libraries/System.Private.Xml.Linq/tests/Properties/FunctionalTests.cs
+++ b/src/libraries/System.Private.Xml.Linq/tests/Properties/FunctionalTests.cs
@@ -24,7 +24,7 @@ public static void RunTests()
}
module.Execute();
- Assert.Equal(0, module.FailCount);
+ Assert.False(module.HasFailures, module.GetFailuresInfo());
}
#region Class
public partial class PropertiesTests : XLinqTestCase
diff --git a/src/libraries/System.Private.Xml.Linq/tests/TreeManipulation/SimpleObjectsCreation.cs b/src/libraries/System.Private.Xml.Linq/tests/TreeManipulation/SimpleObjectsCreation.cs
index e3d5dec29fd3f..d08ab554ed7a9 100644
--- a/src/libraries/System.Private.Xml.Linq/tests/TreeManipulation/SimpleObjectsCreation.cs
+++ b/src/libraries/System.Private.Xml.Linq/tests/TreeManipulation/SimpleObjectsCreation.cs
@@ -933,7 +933,7 @@ public void DTDConstruct()
TestLog.Compare(dtd.Name, data[0], "dtd.Name, data[0]");
TestLog.Compare(dtd.PublicId, data[1], "dtd.SystemId, data[1]");
TestLog.Compare(dtd.SystemId, data[2], "dtd.PublicId, data[2]");
- TestLog.Compare(dtd.InternalSubset, data[3], "dtd.InternalSubset, data[3]");
+ TestLog.Compare(dtd.InternalSubset, data[3], data[3], "dtd.InternalSubset, data[3]");
TestLog.Compare(dtd.NodeType, XmlNodeType.DocumentType, "nodetype");
TestLog.Compare(dtd.ToString(), serial, "DTD construction");
}
diff --git a/src/libraries/System.Private.Xml.Linq/tests/TreeManipulation/TreeManipulationTests.cs b/src/libraries/System.Private.Xml.Linq/tests/TreeManipulation/TreeManipulationTests.cs
index 4596e873fb708..83e2dd75a341f 100644
--- a/src/libraries/System.Private.Xml.Linq/tests/TreeManipulation/TreeManipulationTests.cs
+++ b/src/libraries/System.Private.Xml.Linq/tests/TreeManipulation/TreeManipulationTests.cs
@@ -429,7 +429,7 @@ private static void RunTestCase(TestItem testCase)
module.AddChild(testCase);
module.Execute();
- Assert.Equal(0, module.FailCount);
+ Assert.False(module.HasFailures, module.GetFailuresInfo());
}
}
}
diff --git a/src/libraries/System.Private.Xml.Linq/tests/XDocument.Test.ModuleCore/testcase.cs b/src/libraries/System.Private.Xml.Linq/tests/XDocument.Test.ModuleCore/testcase.cs
index 3000401dcea9b..7018cf869eecf 100644
--- a/src/libraries/System.Private.Xml.Linq/tests/XDocument.Test.ModuleCore/testcase.cs
+++ b/src/libraries/System.Private.Xml.Linq/tests/XDocument.Test.ModuleCore/testcase.cs
@@ -90,7 +90,7 @@ public override TestResult Execute()
{
System.Console.WriteLine(indent + var.Desc);
System.Console.WriteLine(indent + " FAILED");
- module.FailCount++;
+ module.AddFailure(var.Desc);
}
else
{
@@ -116,7 +116,7 @@ public override TestResult Execute()
System.Console.WriteLine(indent + var.Desc);
System.Console.WriteLine(e);
System.Console.WriteLine(indent + " FAILED");
- module.FailCount++;
+ module.AddFailure(var.Desc + Environment.NewLine + e.ToString());
}
}
}
diff --git a/src/libraries/System.Private.Xml.Linq/tests/XDocument.Test.ModuleCore/testmodule.cs b/src/libraries/System.Private.Xml.Linq/tests/XDocument.Test.ModuleCore/testmodule.cs
index cb69e19aaff89..f7adde640eabe 100644
--- a/src/libraries/System.Private.Xml.Linq/tests/XDocument.Test.ModuleCore/testmodule.cs
+++ b/src/libraries/System.Private.Xml.Linq/tests/XDocument.Test.ModuleCore/testmodule.cs
@@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
+using System.Text;
namespace Microsoft.Test.ModuleCore
{
@@ -19,17 +20,15 @@ public abstract class TestModule : TestItem
private int _ppass = 0;
private int _pfail = 0;
private int _pskip = 0;
+ private StringBuilder _failureInfo;
public int PassCount
{
get { return _ppass; }
set { _ppass = value; }
}
- public int FailCount
- {
- get { return _pfail; }
- set { _pfail = value; }
- }
+ public int FailCount => _pfail;
+ public bool HasFailures => _pfail > 0;
public int SkipCount
{
@@ -37,6 +36,18 @@ public int SkipCount
set { _pskip = value; }
}
+ public void AddFailure(string description)
+ {
+ _failureInfo = _failureInfo ?? new StringBuilder();
+ _failureInfo.AppendLine(description);
+ _pfail++;
+ }
+
+ public string GetFailuresInfo()
+ {
+ return _failureInfo?.ToString() ?? string.Empty;
+ }
+
//Constructors
public TestModule()
: this(null, null)
diff --git a/src/libraries/System.Private.Xml.Linq/tests/misc/FunctionalTests.cs b/src/libraries/System.Private.Xml.Linq/tests/misc/FunctionalTests.cs
index bdfa01c4834b8..fe3e152592e24 100644
--- a/src/libraries/System.Private.Xml.Linq/tests/misc/FunctionalTests.cs
+++ b/src/libraries/System.Private.Xml.Linq/tests/misc/FunctionalTests.cs
@@ -24,7 +24,7 @@ public static void RunTests()
module.AddChild(new MiscTests() { Attribute = new TestCaseAttribute() { Name = "Misc", Desc = "XLinq Misc. Tests" } });
module.Execute();
- Assert.Equal(0, module.FailCount);
+ Assert.False(module.HasFailures, module.GetFailuresInfo());
}
public partial class MiscTests : XLinqTestCase
{
diff --git a/src/libraries/System.Private.Xml.Linq/tests/xNodeBuilder/FunctionalTests.cs b/src/libraries/System.Private.Xml.Linq/tests/xNodeBuilder/FunctionalTests.cs
index 717e0846f2173..95a5930371055 100644
--- a/src/libraries/System.Private.Xml.Linq/tests/xNodeBuilder/FunctionalTests.cs
+++ b/src/libraries/System.Private.Xml.Linq/tests/xNodeBuilder/FunctionalTests.cs
@@ -29,7 +29,7 @@ public static void RunTests()
}
module.Execute();
- Assert.Equal(0, module.FailCount);
+ Assert.False(module.HasFailures, module.GetFailuresInfo());
}
#region Code
diff --git a/src/libraries/System.Private.Xml.Linq/tests/xNodeReader/FunctionalTests.cs b/src/libraries/System.Private.Xml.Linq/tests/xNodeReader/FunctionalTests.cs
index 3a94479c6686f..49381eed5a544 100644
--- a/src/libraries/System.Private.Xml.Linq/tests/xNodeReader/FunctionalTests.cs
+++ b/src/libraries/System.Private.Xml.Linq/tests/xNodeReader/FunctionalTests.cs
@@ -26,7 +26,7 @@ public static void RunTests()
module.AddChild(new XNodeReaderTests() { Attribute = new TestCaseAttribute() { Name = "XNodeReader", Desc = "XLinq XNodeReader Tests" } });
module.Execute();
- Assert.Equal(0, module.FailCount);
+ Assert.False(module.HasFailures, module.GetFailuresInfo());
}
#region Class
diff --git a/src/libraries/System.Private.Xml/src/System.Private.Xml.csproj b/src/libraries/System.Private.Xml/src/System.Private.Xml.csproj
index cd4f3919f6e5e..89f0879720374 100644
--- a/src/libraries/System.Private.Xml/src/System.Private.Xml.csproj
+++ b/src/libraries/System.Private.Xml/src/System.Private.Xml.csproj
@@ -562,7 +562,6 @@
-
diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/CodeGenerator.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/CodeGenerator.cs
index 70a208bc8059a..f7ded1c2176cd 100644
--- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/CodeGenerator.cs
+++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/CodeGenerator.cs
@@ -309,7 +309,7 @@ internal void EndFor()
MethodInfo ICollection_get_Count = typeof(ICollection).GetMethod(
"get_Count",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
Call(ICollection_get_Count);
}
diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/CodeIdentifier.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/CodeIdentifier.cs
index edfddffb6b782..89afc4d625d1e 100644
--- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/CodeIdentifier.cs
+++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/CodeIdentifier.cs
@@ -234,7 +234,7 @@ internal static string GetCSharpName(Type t)
}
}
- Type[] arguments = t.IsGenericType || t.ContainsGenericParameters ? t.GetGenericArguments() : Array.Empty();
+ Type[] arguments = t.IsGenericType || t.ContainsGenericParameters ? t.GetGenericArguments() : Type.EmptyTypes;
GetCSharpName(t, arguments, 0, sb);
for (int i = 0; i < rank; i++)
{
diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Compiler.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Compiler.cs
index 3892522ed51e4..890628ad68afc 100644
--- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Compiler.cs
+++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Compiler.cs
@@ -1,25 +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 System.Reflection;
+using System.Collections;
+using System.IO;
+using System.Diagnostics;
+using System.Globalization;
+using System.Runtime.CompilerServices;
+
namespace System.Xml.Serialization
{
- using System.Reflection;
- using System.Reflection.Emit;
- using System.Collections;
- using System.IO;
- using System;
- using System.Text;
- using System.ComponentModel;
- using System.Security;
- using System.Diagnostics;
- using System.Threading;
- using System.Xml.Serialization.Configuration;
- using System.Globalization;
- using System.Runtime.Versioning;
- using System.Runtime.CompilerServices;
- using System.Collections.Generic;
- using System.Linq;
-
internal class Compiler
{
private readonly StringWriter _writer = new StringWriter(CultureInfo.InvariantCulture);
diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Models.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Models.cs
index d8ecf30322ff5..2e84e276bfc0b 100644
--- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Models.cs
+++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Models.cs
@@ -280,7 +280,7 @@ internal FieldModel(MemberInfo memberInfo, Type fieldType, TypeDesc fieldTypeDes
_fieldType = fieldType;
_fieldTypeDesc = fieldTypeDesc;
_memberInfo = memberInfo;
- _checkShouldPersistMethodInfo = memberInfo.DeclaringType!.GetMethod("ShouldSerialize" + memberInfo.Name, Array.Empty());
+ _checkShouldPersistMethodInfo = memberInfo.DeclaringType!.GetMethod("ShouldSerialize" + memberInfo.Name, Type.EmptyTypes);
_checkShouldPersist = _checkShouldPersistMethodInfo != null;
FieldInfo? specifiedField = memberInfo.DeclaringType.GetField(memberInfo.Name + "Specified");
diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/ReflectionXmlSerializationWriter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/ReflectionXmlSerializationWriter.cs
index 1bbf66d2ba940..96fbd5a7ad3b9 100644
--- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/ReflectionXmlSerializationWriter.cs
+++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/ReflectionXmlSerializationWriter.cs
@@ -1,16 +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;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
-using System.Linq;
using System.Reflection;
using System.Text;
-using System.Threading.Tasks;
using System.Xml.Schema;
-using System.Xml;
namespace System.Xml.Serialization
{
diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/SoapAttributes.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/SoapAttributes.cs
index 8f7faee01d1c2..b3c9409becd08 100644
--- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/SoapAttributes.cs
+++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/SoapAttributes.cs
@@ -1,14 +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.Reflection;
+using System.ComponentModel;
+
namespace System.Xml.Serialization
{
- using System;
- using System.Reflection;
- using System.Collections;
- using System.ComponentModel;
- using System.Linq;
-
internal enum SoapAttributeFlags
{
Enum = 0x1,
diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/SourceInfo.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/SourceInfo.cs
index 7b70029ddcbee..d299f299f6cbd 100644
--- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/SourceInfo.cs
+++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/SourceInfo.cs
@@ -216,7 +216,7 @@ private void ConvertNullableValue(Type nullableType, Type targetType)
MethodInfo Nullable_get_Value = nullableType.GetMethod(
"get_Value",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ILG.Call(Nullable_get_Value);
if (targetType != null)
diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Types.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Types.cs
index db191768f82bb..d9c83f45719a8 100644
--- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Types.cs
+++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Types.cs
@@ -1216,7 +1216,7 @@ private static bool ShouldBeReplaced(MemberInfo memberInfoToBeReplaced, Type der
private static TypeFlags GetConstructorFlags(Type type, ref Exception? exception)
{
- ConstructorInfo? ctor = type.GetConstructor(BindingFlags.Public | BindingFlags.Instance | BindingFlags.NonPublic, Array.Empty());
+ ConstructorInfo? ctor = type.GetConstructor(BindingFlags.Public | BindingFlags.Instance | BindingFlags.NonPublic, Type.EmptyTypes);
if (ctor != null)
{
TypeFlags flags = TypeFlags.HasDefaultConstructor;
@@ -1243,7 +1243,7 @@ private static TypeFlags GetConstructorFlags(Type type, ref Exception? exception
{
if (typeof(IEnumerable).IsAssignableFrom(type))
{
- MethodInfo? enumerator = type.GetMethod("GetEnumerator", Array.Empty());
+ MethodInfo? enumerator = type.GetMethod("GetEnumerator", Type.EmptyTypes);
if (enumerator == null || !typeof(IEnumerator).IsAssignableFrom(enumerator.ReturnType))
{
@@ -1267,7 +1267,7 @@ private static TypeFlags GetConstructorFlags(Type type, ref Exception? exception
{
// and finally private interface implementation
flags |= TypeFlags.UsePrivateImplementation;
- enumerator = type.GetMethod("System.Collections.IEnumerable.GetEnumerator", BindingFlags.Public | BindingFlags.Instance | BindingFlags.NonPublic, Array.Empty());
+ enumerator = type.GetMethod("System.Collections.IEnumerable.GetEnumerator", BindingFlags.Public | BindingFlags.Instance | BindingFlags.NonPublic, Type.EmptyTypes);
}
}
if (enumerator == null || !typeof(IEnumerator).IsAssignableFrom(enumerator.ReturnType))
diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlAttributes.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlAttributes.cs
index f8fbd5e4e246e..06c999cc2b86a 100644
--- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlAttributes.cs
+++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlAttributes.cs
@@ -1,16 +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.Reflection;
+using System.ComponentModel;
+
namespace System.Xml.Serialization
{
- using System;
- using System.Reflection;
- using System.Collections;
- using System.ComponentModel;
- using System.Linq;
- using System.Collections.Generic;
- using System.Xml.Serialization;
-
internal enum XmlAttributeFlags
{
Enum = 0x1,
diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationEventSource.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationEventSource.cs
index 605cc23c4d171..d9fe51c556258 100644
--- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationEventSource.cs
+++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationEventSource.cs
@@ -1,11 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
using System.Diagnostics.Tracing;
namespace System.Xml.Serialization
diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationILGen.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationILGen.cs
index 933a04563bd95..6ff443ee3c6f9 100644
--- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationILGen.cs
+++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationILGen.cs
@@ -165,7 +165,7 @@ internal FieldBuilder GenerateHashtableGetBegin(string privateName, string publi
ilg.BeginMethod(
typeof(Hashtable),
"get_" + publicName,
- Array.Empty(),
+ Type.EmptyTypes,
Array.Empty(),
CodeGenerator.PublicOverrideMethodAttributes | MethodAttributes.SpecialName);
propertyBuilder.SetGetMethod(ilg.MethodBuilder!);
@@ -178,7 +178,7 @@ internal FieldBuilder GenerateHashtableGetBegin(string privateName, string publi
ConstructorInfo Hashtable_ctor = typeof(Hashtable).GetConstructor(
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
LocalBuilder _tmpLoc = ilg.DeclareLocal(typeof(Hashtable), "_tmp");
ilg.New(Hashtable_ctor);
@@ -278,16 +278,16 @@ internal string GenerateBaseSerializer(string baseSerializer, string readerClass
CodeIdentifier.GetCSharpName(baseSerializer),
TypeAttributes.Public | TypeAttributes.Abstract | TypeAttributes.BeforeFieldInit,
typeof(XmlSerializer),
- Array.Empty());
+ Type.EmptyTypes);
ConstructorInfo readerCtor = CreatedTypes[readerClass].GetConstructor(
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg = new CodeGenerator(baseSerializerTypeBuilder);
ilg.BeginMethod(typeof(XmlSerializationReader),
"CreateReader",
- Array.Empty(),
+ Type.EmptyTypes,
Array.Empty(),
CodeGenerator.ProtectedOverrideMethodAttributes);
ilg.New(readerCtor);
@@ -295,11 +295,11 @@ internal string GenerateBaseSerializer(string baseSerializer, string readerClass
ConstructorInfo writerCtor = CreatedTypes[writerClass].GetConstructor(
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.BeginMethod(typeof(XmlSerializationWriter),
"CreateWriter",
- Array.Empty(),
+ Type.EmptyTypes,
Array.Empty(),
CodeGenerator.ProtectedOverrideMethodAttributes);
ilg.New(writerCtor);
@@ -323,7 +323,7 @@ internal string GenerateTypedSerializer(string readMethod, string writeMethod, X
CodeIdentifier.GetCSharpName(serializerName),
TypeAttributes.Public | TypeAttributes.Sealed | TypeAttributes.BeforeFieldInit,
CreatedTypes[baseSerializer],
- Array.Empty()
+ Type.EmptyTypes
);
ilg = new CodeGenerator(typedSerializerTypeBuilder);
@@ -395,7 +395,7 @@ internal string GenerateTypedSerializer(string readMethod, string writeMethod, X
MethodInfo readerType_readMethod = CreatedTypes[readerClass].GetMethod(
readMethod,
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg("reader");
ilg.Castclass(CreatedTypes[readerClass]);
@@ -423,7 +423,7 @@ private FieldBuilder GenerateTypedSerializers(Dictionary seriali
{
ConstructorInfo ctor = CreatedTypes[(string)serializers[key]].GetConstructor(
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg!.Ldloc(typeof(Hashtable), "_tmp");
ilg.Ldstr(GetCSharpString(key));
@@ -463,7 +463,7 @@ private void GenerateGetSerializer(Dictionary serializers, XmlMa
{
ConstructorInfo ctor = CreatedTypes[(string)serializers[xmlMappings[i].Key!]].GetConstructor(
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.New(ctor);
ilg.Stloc(ilg.ReturnLocal);
@@ -487,7 +487,7 @@ internal void GenerateSerializerContract(string className, XmlMapping[] xmlMappi
"XmlSerializerContract",
TypeAttributes.Public | TypeAttributes.BeforeFieldInit,
typeof(XmlSerializerImplementation),
- Array.Empty()
+ Type.EmptyTypes
);
ilg = new CodeGenerator(serializerContractTypeBuilder);
@@ -499,13 +499,13 @@ internal void GenerateSerializerContract(string className, XmlMapping[] xmlMappi
ilg.BeginMethod(
typeof(XmlSerializationReader),
"get_Reader",
- Array.Empty(),
+ Type.EmptyTypes,
Array.Empty(),
CodeGenerator.PublicOverrideMethodAttributes | MethodAttributes.SpecialName);
propertyBuilder.SetGetMethod(ilg.MethodBuilder!);
ConstructorInfo ctor = CreatedTypes[readerType].GetConstructor(
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.New(ctor);
ilg.EndMethod();
@@ -519,13 +519,13 @@ internal void GenerateSerializerContract(string className, XmlMapping[] xmlMappi
ilg.BeginMethod(
typeof(XmlSerializationWriter),
"get_Writer",
- Array.Empty(),
+ Type.EmptyTypes,
Array.Empty(),
CodeGenerator.PublicOverrideMethodAttributes | MethodAttributes.SpecialName);
propertyBuilder.SetGetMethod(ilg.MethodBuilder!);
ctor = CreatedTypes[writerType].GetConstructor(
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.New(ctor);
ilg.EndMethod();
@@ -539,13 +539,13 @@ internal void GenerateSerializerContract(string className, XmlMapping[] xmlMappi
// Default ctor
ConstructorInfo baseCtor = typeof(XmlSerializerImplementation).GetConstructor(
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg = new CodeGenerator(serializerContractTypeBuilder);
ilg.BeginMethod(
typeof(void),
".ctor",
- Array.Empty(),
+ Type.EmptyTypes,
Array.Empty(),
CodeGenerator.PublicMethodAttributes | MethodAttributes.RTSpecialName | MethodAttributes.SpecialName
);
diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationReaderILGen.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationReaderILGen.cs
index 31c149ad8c5d3..5e9de6e59784e 100644
--- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationReaderILGen.cs
+++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationReaderILGen.cs
@@ -193,7 +193,7 @@ internal void GenerateBegin()
ClassName,
TypeAttributes | TypeAttributes.BeforeFieldInit,
typeof(XmlSerializationReader),
- Array.Empty());
+ Type.EmptyTypes);
foreach (TypeScope scope in Scopes)
{
foreach (TypeMapping mapping in scope.TypeMappings)
@@ -230,17 +230,17 @@ internal void GenerateEnd(string[] methods, XmlMapping[] xmlMappings, Type[] typ
GenerateInitCallbacksMethod();
ilg = new CodeGenerator(this.typeBuilder);
- ilg.BeginMethod(typeof(void), "InitIDs", Array.Empty(), Array.Empty(),
+ ilg.BeginMethod(typeof(void), "InitIDs", Type.EmptyTypes, Array.Empty(),
CodeGenerator.ProtectedOverrideMethodAttributes);
MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod(
"get_Reader",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlReader_get_NameTable = typeof(XmlReader).GetMethod(
"get_NameTable",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlNameTable_Add = typeof(XmlNameTable).GetMethod(
"Add",
@@ -287,7 +287,7 @@ private void WriteIsStartTag(string? name, string? ns)
MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod(
"get_Reader",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlReader_IsStartElement = typeof(XmlReader).GetMethod(
"IsStartElement",
@@ -345,7 +345,7 @@ private void WriteUnknownNode(string func, string node, ElementAccessor? e, bool
private void GenerateInitCallbacksMethod()
{
ilg = new CodeGenerator(this.typeBuilder);
- ilg.BeginMethod(typeof(void), "InitCallbacks", Array.Empty(), Array.Empty(),
+ ilg.BeginMethod(typeof(void), "InitCallbacks", Type.EmptyTypes, Array.Empty(),
CodeGenerator.ProtectedOverrideMethodAttributes);
ilg.EndMethod();
}
@@ -394,7 +394,7 @@ private string GenerateLiteralMembersElement(XmlMembersMapping xmlMembersMapping
ilg.BeginMethod(
typeof(object[]),
methodName,
- Array.Empty(),
+ Type.EmptyTypes,
Array.Empty(),
CodeGenerator.PublicMethodAttributes
);
@@ -403,12 +403,12 @@ private string GenerateLiteralMembersElement(XmlMembersMapping xmlMembersMapping
MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod(
"get_Reader",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlReader_MoveToContent = typeof(XmlReader).GetMethod(
"MoveToContent",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_Reader);
@@ -523,7 +523,7 @@ private string GenerateLiteralMembersElement(XmlMembersMapping xmlMembersMapping
MethodInfo XmlReader_MoveToElement = typeof(XmlReader).GetMethod(
"MoveToElement",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_Reader);
@@ -538,7 +538,7 @@ private string GenerateLiteralMembersElement(XmlMembersMapping xmlMembersMapping
MethodInfo XmlReader_get_IsEmptyElement = typeof(XmlReader).GetMethod(
"get_IsEmptyElement",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_Reader);
@@ -548,7 +548,7 @@ private string GenerateLiteralMembersElement(XmlMembersMapping xmlMembersMapping
MethodInfo XmlReader_Skip = typeof(XmlReader).GetMethod(
"Skip",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_Reader);
@@ -563,7 +563,7 @@ private string GenerateLiteralMembersElement(XmlMembersMapping xmlMembersMapping
MethodInfo XmlReader_ReadStartElement = typeof(XmlReader).GetMethod(
"ReadStartElement",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_Reader);
@@ -592,7 +592,7 @@ private string GenerateLiteralMembersElement(XmlMembersMapping xmlMembersMapping
MethodInfo XmlSerializationReader_ReadEndElement = typeof(XmlSerializationReader).GetMethod(
"ReadEndElement",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_ReadEndElement);
@@ -637,7 +637,7 @@ private string GenerateTypeElement(XmlTypeMapping xmlTypeMapping)
ilg.BeginMethod(
typeof(object),
methodName,
- Array.Empty(),
+ Type.EmptyTypes,
Array.Empty(),
CodeGenerator.PublicMethodAttributes
);
@@ -652,12 +652,12 @@ private string GenerateTypeElement(XmlTypeMapping xmlTypeMapping)
MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod(
"get_Reader",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlReader_MoveToContent = typeof(XmlReader).GetMethod(
"MoveToContent",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_Reader);
@@ -705,12 +705,12 @@ private void WritePrimitive(TypeMapping mapping, string source)
MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod(
"get_Reader",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlReader_ReadXXXString = typeof(XmlReader).GetMethod(
source == "Reader.ReadElementString()" ? "ReadElementContentAsString" : "ReadContentAsString",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_Reader);
@@ -721,12 +721,12 @@ private void WritePrimitive(TypeMapping mapping, string source)
MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod(
"get_Reader",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlReader_get_Value = typeof(XmlReader).GetMethod(
"get_Value",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_Reader);
@@ -755,12 +755,12 @@ private void WritePrimitive(TypeMapping mapping, string source)
MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod(
"get_Reader",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlReader_ReadXXXString = typeof(XmlReader).GetMethod(
source == "Reader.ReadElementString()" ? "ReadElementContentAsString" : "ReadContentAsString",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_Reader);
@@ -771,12 +771,12 @@ private void WritePrimitive(TypeMapping mapping, string source)
MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod(
"get_Reader",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlReader_get_Value = typeof(XmlReader).GetMethod(
"get_Value",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_Reader);
@@ -820,12 +820,12 @@ private void WritePrimitive(TypeMapping mapping, string source)
MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod(
"get_Reader",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlReader_method = typeof(XmlReader).GetMethod(
source == "Reader.Value" ? "get_Value" : "ReadElementContentAsString",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
if (mapping.TypeDesc.CollapseWhitespace)
ilg.Ldarg(0);
@@ -878,12 +878,12 @@ private void WritePrimitive(TypeMapping mapping, string source)
MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod(
"get_Reader",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlReader_ReadXXXString = typeof(XmlReader).GetMethod(
source == "Reader.ReadElementString()" ? "ReadElementContentAsString" : "ReadContentAsString",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_Reader);
@@ -894,12 +894,12 @@ private void WritePrimitive(TypeMapping mapping, string source)
MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod(
"get_Reader",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlReader_get_Value = typeof(XmlReader).GetMethod(
"get_Value",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_Reader);
@@ -970,7 +970,7 @@ private string WriteHashtable(EnumMapping mapping, string typeName, out MethodBu
ilg.BeginMethod(
typeof(Hashtable),
"get_" + propName,
- Array.Empty(),
+ Type.EmptyTypes,
Array.Empty(),
MethodAttributes.Assembly | MethodAttributes.HideBySig | MethodAttributes.SpecialName);
@@ -981,7 +981,7 @@ private string WriteHashtable(EnumMapping mapping, string typeName, out MethodBu
ConstructorInfo Hashtable_ctor = typeof(Hashtable).GetConstructor(
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
LocalBuilder hLoc = ilg.DeclareLocal(typeof(Hashtable), "h");
ilg.New(Hashtable_ctor);
@@ -1190,12 +1190,12 @@ private void WriteEnumAndArrayTypes()
MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod(
"get_Reader",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlReader_ReadStartElement = typeof(XmlReader).GetMethod(
"ReadStartElement",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_Reader);
@@ -1220,7 +1220,7 @@ private void WriteEnumAndArrayTypes()
MethodInfo XmlReader_ReadString = typeof(XmlReader).GetMethod(
"ReadContentAsString",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Ldarg(0);
@@ -1234,7 +1234,7 @@ private void WriteEnumAndArrayTypes()
MethodInfo XmlSerializationReader_ReadEndElement = typeof(XmlSerializationReader).GetMethod(
"ReadEndElement",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_ReadEndElement);
@@ -1300,7 +1300,7 @@ private void WriteNullableMethod(NullableMapping nullableMapping)
MethodInfo XmlSerializationReader_ReadNull = typeof(XmlSerializationReader).GetMethod(
"ReadNull",
CodeGenerator.InstanceBindingFlags,
- Array.Empty())!;
+ Type.EmptyTypes)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_ReadNull);
ilg.If();
@@ -1358,12 +1358,12 @@ private void WriteLiteralStructMethod(StructMapping structMapping)
MethodInfo XmlSerializationReader_GetXsiType = typeof(XmlSerializationReader).GetMethod(
"GetXsiType",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlSerializationReader_ReadNull = typeof(XmlSerializationReader).GetMethod(
"ReadNull",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
Label labelTrue = ilg.DefineLabel();
Label labelEnd = ilg.DefineLabel();
@@ -1622,12 +1622,12 @@ private void WriteLiteralStructMethod(StructMapping structMapping)
MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod(
"get_Reader",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlReader_MoveToElement = typeof(XmlReader).GetMethod(
"MoveToElement",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_Reader);
@@ -1637,7 +1637,7 @@ private void WriteLiteralStructMethod(StructMapping structMapping)
MethodInfo XmlReader_get_IsEmptyElement = typeof(XmlReader).GetMethod(
"get_IsEmptyElement",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_Reader);
@@ -1646,7 +1646,7 @@ private void WriteLiteralStructMethod(StructMapping structMapping)
MethodInfo XmlReader_Skip = typeof(XmlReader).GetMethod(
"Skip",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_Reader);
@@ -1660,7 +1660,7 @@ private void WriteLiteralStructMethod(StructMapping structMapping)
MethodInfo XmlReader_ReadStartElement = typeof(XmlReader).GetMethod(
"ReadStartElement",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_Reader);
@@ -1676,7 +1676,7 @@ private void WriteLiteralStructMethod(StructMapping structMapping)
MethodInfo XmlReader_MoveToContent = typeof(XmlReader).GetMethod(
"MoveToContent",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_Reader);
@@ -1689,7 +1689,7 @@ private void WriteLiteralStructMethod(StructMapping structMapping)
MethodInfo XmlSerializationReader_ReadEndElement = typeof(XmlSerializationReader).GetMethod(
"ReadEndElement",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_ReadEndElement);
@@ -1710,12 +1710,12 @@ private void WriteQNameEqual(string source, string? name, string? ns)
MethodInfo XmlQualifiedName_get_Name = typeof(XmlQualifiedName).GetMethod(
"get_Name",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlQualifiedName_get_Namespace = typeof(XmlQualifiedName).GetMethod(
"get_Namespace",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
Label labelEnd = ilg.DefineLabel();
Label labelFalse = ilg.DefineLabel();
@@ -1753,17 +1753,17 @@ private void WriteXmlNodeEqual(string source, string name, string? ns, bool doAn
MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod(
"get_" + source,
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlReader_get_LocalName = typeof(XmlReader).GetMethod(
"get_LocalName",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlReader_get_NamespaceURI = typeof(XmlReader).GetMethod(
"get_NamespaceURI",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
Label labelFalse = ilg.DefineLabel();
@@ -1824,12 +1824,12 @@ private void WriteAttributes(Member[] members, Member? anyAttribute, string else
MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod(
"get_Reader",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlReader_MoveToNextAttribute = typeof(XmlReader).GetMethod(
"MoveToNextAttribute",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.WhileBegin();
@@ -1888,17 +1888,17 @@ private void WriteAttributes(Member[] members, Member? anyAttribute, string else
MethodInfo XmlReader_get_Name = typeof(XmlReader).GetMethod(
"get_Name",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlReader_get_LocalName = typeof(XmlReader).GetMethod(
"get_LocalName",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlReader_get_Value = typeof(XmlReader).GetMethod(
"get_Value",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Ldarg(0);
@@ -1914,7 +1914,7 @@ private void WriteAttributes(Member[] members, Member? anyAttribute, string else
WriteSourceBegin(xmlnsMember.Source);
ConstructorInfo ctor = xmlnsMember.Mapping.TypeDesc!.Type!.GetConstructor(
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.New(ctor);
WriteSourceEnd(xmlnsMember.Source, xmlnsMember.Mapping.TypeDesc.Type!);
@@ -1930,7 +1930,7 @@ private void WriteAttributes(Member[] members, Member? anyAttribute, string else
MethodInfo String_get_Length = typeof(string).GetMethod(
"get_Length",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ILGenLoad(xmlnsMember.ArraySource, xmlnsMember.Mapping.TypeDesc.Type);
ilg.Ldarg(0);
@@ -1963,7 +1963,7 @@ private void WriteAttributes(Member[] members, Member? anyAttribute, string else
MethodInfo XmlReader_get_Name = typeof(XmlReader).GetMethod(
"get_Name",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Ldarg(0);
@@ -1979,7 +1979,7 @@ private void WriteAttributes(Member[] members, Member? anyAttribute, string else
MethodInfo XmlSerializationReader_get_Document = typeof(XmlSerializationReader).GetMethod(
"get_Document",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlDocument_ReadNode = typeof(XmlDocument).GetMethod(
"ReadNode",
@@ -2094,12 +2094,12 @@ private void WriteAttribute(Member member)
MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod(
"get_Reader",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlReader_get_Value = typeof(XmlReader).GetMethod(
"get_Value",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_Reader);
@@ -2253,12 +2253,12 @@ private void WriteMemberElements(Member[] members, string elementElseString, str
MethodInfo XmlReader_get_NodeType = typeof(XmlReader).GetMethod(
"get_NodeType",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod(
"get_Reader",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
int XmlNodeType_Element = 1;
ilg.Ldarg(0);
@@ -2285,12 +2285,12 @@ private void WriteMemberText(Member anyText, string elseString)
MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod(
"get_Reader",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlReader_get_NodeType = typeof(XmlReader).GetMethod(
"get_NodeType",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_Reader);
@@ -2342,17 +2342,17 @@ private void WriteText(Member member)
MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod(
"get_Reader",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlReader_ReadString = typeof(XmlReader).GetMethod(
"ReadContentAsString",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlSerializationReader_get_Document = typeof(XmlSerializationReader).GetMethod(
"get_Document",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlDocument_CreateTextNode = typeof(XmlDocument).GetMethod(
"CreateTextNode",
@@ -2386,12 +2386,12 @@ private void WriteText(Member member)
MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod(
"get_Reader",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlReader_ReadString = typeof(XmlReader).GetMethod(
"ReadContentAsString",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_Reader);
@@ -2526,7 +2526,7 @@ private void WriteMemberElementsIf(Member[] members, Member? anyElement, string
MethodInfo XmlSerializationReader_get_IsReturnValue = typeof(XmlSerializationReader).GetMethod(
"get_IsReturnValue",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_IsReturnValue);
@@ -2869,7 +2869,7 @@ private void WriteArray(string source, string? arrayName, ArrayMapping arrayMapp
MethodInfo XmlSerializationReader_ReadNull = typeof(XmlSerializationReader).GetMethod(
"ReadNull",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_ReadNull);
@@ -2904,12 +2904,12 @@ private void WriteArray(string source, string? arrayName, ArrayMapping arrayMapp
MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod(
"get_Reader",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlReader_get_IsEmptyElement = typeof(XmlReader).GetMethod(
"get_IsEmptyElement",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_Reader);
@@ -2925,7 +2925,7 @@ private void WriteArray(string source, string? arrayName, ArrayMapping arrayMapp
MethodInfo XmlReader_Skip = typeof(XmlReader).GetMethod(
"Skip",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_Reader);
@@ -2935,7 +2935,7 @@ private void WriteArray(string source, string? arrayName, ArrayMapping arrayMapp
MethodInfo XmlReader_ReadStartElement = typeof(XmlReader).GetMethod(
"ReadStartElement",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_Reader);
@@ -2947,7 +2947,7 @@ private void WriteArray(string source, string? arrayName, ArrayMapping arrayMapp
MethodInfo XmlReader_MoveToContent = typeof(XmlReader).GetMethod(
"MoveToContent",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_Reader);
@@ -2958,7 +2958,7 @@ private void WriteArray(string source, string? arrayName, ArrayMapping arrayMapp
MethodInfo XmlSerializationReader_ReadEndElement = typeof(XmlSerializationReader).GetMethod(
"ReadEndElement",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_ReadEndElement);
@@ -3015,7 +3015,7 @@ private void WriteElement(string source, string? arrayName, string? choiceSource
MethodInfo XmlSerializationReader_ReadNull = typeof(XmlSerializationReader).GetMethod(
"ReadNull",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_ReadNull);
@@ -3038,12 +3038,12 @@ private void WriteElement(string source, string? arrayName, string? choiceSource
MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod(
"get_Reader",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlReader_get_IsEmptyElement = typeof(XmlReader).GetMethod(
"get_IsEmptyElement",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_Reader);
@@ -3052,7 +3052,7 @@ private void WriteElement(string source, string? arrayName, string? choiceSource
MethodInfo XmlReader_Skip = typeof(XmlReader).GetMethod(
"Skip",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_Reader);
@@ -3069,12 +3069,12 @@ private void WriteElement(string source, string? arrayName, string? choiceSource
MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod(
"get_Reader",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlReader_get_IsEmptyElement = typeof(XmlReader).GetMethod(
"get_IsEmptyElement",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_Reader);
@@ -3084,7 +3084,7 @@ private void WriteElement(string source, string? arrayName, string? choiceSource
MethodInfo XmlReader_Skip = typeof(XmlReader).GetMethod(
"Skip",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_Reader);
@@ -3112,7 +3112,7 @@ private void WriteElement(string source, string? arrayName, string? choiceSource
MethodInfo XmlSerializationReader_ReadElementQualifiedName = typeof(XmlSerializationReader).GetMethod(
"ReadElementQualifiedName",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_ReadElementQualifiedName);
@@ -3153,12 +3153,12 @@ private void WriteElement(string source, string? arrayName, string? choiceSource
MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod(
"get_Reader",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlReader_Skip = typeof(XmlReader).GetMethod(
"Skip",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldloc(arrayName!);
ilg.Load(null);
@@ -3219,7 +3219,7 @@ private void WriteElement(string source, string? arrayName, string? choiceSource
MethodInfo XmlSerializationReader_GetXsiType = typeof(XmlSerializationReader).GetMethod(
"GetXsiType",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
Label labelTrue = ilg.DefineLabel();
Label labelEnd = ilg.DefineLabel();
@@ -3372,12 +3372,12 @@ private void WriteWhileNotLoopStart()
MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod(
"get_Reader",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlReader_MoveToContent = typeof(XmlReader).GetMethod(
"MoveToContent",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_get_Reader);
@@ -3397,12 +3397,12 @@ private void WriteWhileLoopEnd()
MethodInfo XmlSerializationReader_get_Reader = typeof(XmlSerializationReader).GetMethod(
"get_Reader",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlReader_get_NodeType = typeof(XmlReader).GetMethod(
"get_NodeType",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
Label labelFalse = ilg.DefineLabel();
Label labelEnd = ilg.DefineLabel();
@@ -3586,7 +3586,7 @@ private void ILGenElementElseString(string elementElseString)
MethodInfo XmlSerializationReader_CreateUnknownNodeException = typeof(XmlSerializationReader).GetMethod(
"CreateUnknownNodeException",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationReader_CreateUnknownNodeException);
diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationWriterILGen.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationWriterILGen.cs
index abf082b98b8ee..48c39db732c44 100644
--- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationWriterILGen.cs
+++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationWriterILGen.cs
@@ -29,7 +29,7 @@ internal void GenerateBegin()
ClassName,
TypeAttributes | TypeAttributes.BeforeFieldInit,
typeof(XmlSerializationWriter),
- Array.Empty());
+ Type.EmptyTypes);
foreach (TypeScope scope in Scopes)
{
@@ -84,7 +84,7 @@ internal Type GenerateEnd()
private void GenerateInitCallbacksMethod()
{
ilg = new CodeGenerator(this.typeBuilder);
- ilg.BeginMethod(typeof(void), "InitCallbacks", Array.Empty(), Array.Empty(),
+ ilg.BeginMethod(typeof(void), "InitCallbacks", Type.EmptyTypes, Array.Empty(),
CodeGenerator.ProtectedOverrideMethodAttributes);
ilg.EndMethod();
}
@@ -315,7 +315,7 @@ private void WriteEndElement()
MethodInfo XmlSerializationWriter_WriteEndElement = typeof(XmlSerializationWriter).GetMethod(
"WriteEndElement",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationWriter_WriteEndElement);
@@ -363,7 +363,7 @@ private string GenerateMembersElement(XmlMembersMapping xmlMembersMapping)
MethodInfo XmlSerializationWriter_WriteStartDocument = typeof(XmlSerializationWriter).GetMethod(
"WriteStartDocument",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationWriter_WriteStartDocument);
@@ -371,7 +371,7 @@ private string GenerateMembersElement(XmlMembersMapping xmlMembersMapping)
MethodInfo XmlSerializationWriter_TopLevelElement = typeof(XmlSerializationWriter).GetMethod(
"TopLevelElement",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationWriter_TopLevelElement);
@@ -554,7 +554,7 @@ private string GenerateTypeElement(XmlTypeMapping xmlTypeMapping)
MethodInfo XmlSerializationWriter_WriteStartDocument = typeof(XmlSerializationWriter).GetMethod(
"WriteStartDocument",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationWriter_WriteStartDocument);
@@ -574,7 +574,7 @@ private string GenerateTypeElement(XmlTypeMapping xmlTypeMapping)
MethodInfo XmlSerializationWriter_TopLevelElement = typeof(XmlSerializationWriter).GetMethod(
"TopLevelElement",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationWriter_TopLevelElement);
@@ -698,7 +698,7 @@ private void WriteEnumMethod(EnumMapping mapping)
MethodInfo CultureInfo_get_InvariantCulture = typeof(CultureInfo).GetMethod(
"get_InvariantCulture",
CodeGenerator.StaticBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo Int64_ToString = typeof(long).GetMethod(
"ToString",
@@ -799,7 +799,7 @@ private void WriteEnumAndArrayTypes()
MethodInfo XmlSerializationWriter_get_Writer = typeof(XmlSerializationWriter).GetMethod(
"get_Writer",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlWriter_WriteStartElement = typeof(XmlWriter).GetMethod(
"WriteStartElement",
@@ -842,7 +842,7 @@ private void WriteEnumAndArrayTypes()
MethodInfo XmlWriter_WriteEndElement = typeof(XmlWriter).GetMethod(
"WriteEndElement",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationWriter_get_Writer);
@@ -865,7 +865,7 @@ private void WriteEnumAndArrayTypes()
MethodInfo XmlSerializationWriter_get_Writer = typeof(XmlSerializationWriter).GetMethod(
"get_Writer",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlWriter_WriteStartElement = typeof(XmlWriter).GetMethod(
"WriteStartElement",
@@ -892,7 +892,7 @@ private void WriteEnumAndArrayTypes()
MethodInfo XmlWriter_WriteEndElement = typeof(XmlWriter).GetMethod(
"WriteEndElement",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationWriter_get_Writer);
@@ -957,7 +957,7 @@ private void WriteStructMethod(StructMapping mapping)
MethodInfo Object_GetType = typeof(object).GetMethod(
"GetType",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ArgBuilder oArg = ilg.GetArg("o");
ilg.LdargAddress(oArg);
@@ -1171,7 +1171,7 @@ private void WriteMember(SourceInfo source, AttributeAccessor attribute, TypeDes
MethodInfo XmlSerializationWriter_get_Writer = typeof(XmlSerializationWriter).GetMethod(
"get_Writer",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlWriter_WriteStartAttribute = typeof(XmlWriter).GetMethod(
"WriteStartAttribute",
@@ -1190,7 +1190,7 @@ private void WriteMember(SourceInfo source, AttributeAccessor attribute, TypeDes
LocalBuilder sbLoc = ilg.DeclareOrGetLocal(typeof(StringBuilder), "sb");
ConstructorInfo StringBuilder_ctor = typeof(StringBuilder).GetConstructor(
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.New(StringBuilder_ctor);
ilg.Stloc(sbLoc);
@@ -1222,7 +1222,7 @@ private void WriteMember(SourceInfo source, AttributeAccessor attribute, TypeDes
MethodInfo XmlSerializationWriter_get_Writer = typeof(XmlSerializationWriter).GetMethod(
"get_Writer",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlWriter_WriteString = typeof(XmlWriter).GetMethod(
"WriteString",
@@ -1286,12 +1286,12 @@ private void WriteMember(SourceInfo source, AttributeAccessor attribute, TypeDes
MethodInfo XmlSerializationWriter_get_Writer = typeof(XmlSerializationWriter).GetMethod(
"get_Writer",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
MethodInfo XmlWriter_WriteEndAttribute = typeof(XmlWriter).GetMethod(
"WriteEndAttribute",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldarg(0);
ilg.Call(XmlSerializationWriter_get_Writer);
@@ -1302,7 +1302,7 @@ private void WriteMember(SourceInfo source, AttributeAccessor attribute, TypeDes
MethodInfo StringBuilder_get_Length = typeof(StringBuilder).GetMethod(
"get_Length",
CodeGenerator.InstanceBindingFlags,
- Array.Empty()
+ Type.EmptyTypes
)!;
ilg.Ldloc("sb");
ilg.Call(StringBuilder_get_Length);
@@ -1322,7 +1322,7 @@ private void WriteMember(SourceInfo source, AttributeAccessor attribute, TypeDes
MethodInfo Object_ToString = typeof(object).GetMethod(
"ToString",
CodeGenerator.InstanceBindingFlags,
- Array.Empty